Fake oEmbed version in OpenGraph return object

This commit is contained in:
Mikael Nordfeldth 2016-01-14 02:09:12 +01:00
parent 331abf173b
commit 53339ff463

View File

@ -28,6 +28,8 @@ class OpenGraphHelper
static function ogFromHtml(DOMDocument $dom) { static function ogFromHtml(DOMDocument $dom) {
$obj = new stdClass(); $obj = new stdClass();
$obj->version = '1.0'; // fake it til u make it
$nodes = $dom->getElementsByTagName('meta'); $nodes = $dom->getElementsByTagName('meta');
for ($i = 0; $i < $nodes->length; $i++) { for ($i = 0; $i < $nodes->length; $i++) {
$node = $nodes->item($i); $node = $nodes->item($i);