|
@@ 78-82 (lines=5) @@
|
| 75 |
|
|
| 76 |
|
$nodes = $this->article()->getDoc()->find('meta[property^="og:"]'); |
| 77 |
|
|
| 78 |
|
foreach ($nodes as $node) { |
| 79 |
|
$property = explode(':', $node->attr('property')); |
| 80 |
|
|
| 81 |
|
$results[$property[1]] = $node->attr('content'); |
| 82 |
|
} |
| 83 |
|
|
| 84 |
|
// Additionally retrieve type values based on provided og:type (http://ogp.me/#types) |
| 85 |
|
if (isset($results['type'])) { |
|
@@ 88-92 (lines=5) @@
|
| 85 |
|
if (isset($results['type'])) { |
| 86 |
|
$nodes = $this->article()->getDoc()->find('meta[property^="' . $results['type'] .':"]'); |
| 87 |
|
|
| 88 |
|
foreach ($nodes as $node) { |
| 89 |
|
$property = explode(':', $node->attr('property')); |
| 90 |
|
|
| 91 |
|
$results[$property[1]] = $node->attr('content'); |
| 92 |
|
} |
| 93 |
|
} |
| 94 |
|
|
| 95 |
|
return $results; |