|
@@ 55-59 (lines=5) @@
|
| 52 |
|
|
| 53 |
|
$nodes = $this->article()->getDoc()->find('meta[property^="og:"]'); |
| 54 |
|
|
| 55 |
|
foreach ($nodes as $node) { |
| 56 |
|
$property = explode(':', $node->attr('property')); |
| 57 |
|
|
| 58 |
|
$results[$property[1]] = $node->attr('content'); |
| 59 |
|
} |
| 60 |
|
|
| 61 |
|
// Additionally retrieve type values based on provided og:type (http://ogp.me/#types) |
| 62 |
|
if (isset($results['type'])) { |
|
@@ 65-69 (lines=5) @@
|
| 62 |
|
if (isset($results['type'])) { |
| 63 |
|
$nodes = $this->article()->getDoc()->find('meta[property^="' . $results['type'] .':"]'); |
| 64 |
|
|
| 65 |
|
foreach ($nodes as $node) { |
| 66 |
|
$property = explode(':', $node->attr('property')); |
| 67 |
|
|
| 68 |
|
$results[$property[1]] = $node->attr('content'); |
| 69 |
|
} |
| 70 |
|
} |
| 71 |
|
|
| 72 |
|
return $results; |