Fix "relatedLink" NULL in Schema.org/WebPage for backlinks

This commit is contained in:
Giuseppe Di Terlizzi 2015-03-26 01:48:51 +01:00
parent b90809e172
commit aef0493154

View file

@ -124,10 +124,14 @@ class action_plugin_semantic extends DokuWiki_Action_Plugin {
} }
} }
$event->data["script"][] = array ( if (isset($json_ld_webpage['relatedLink'])) {
"type" => "application/ld+json",
"_data" => json_encode($json_ld_webpage), $event->data["script"][] = array (
); "type" => "application/ld+json",
"_data" => json_encode($json_ld_webpage),
);
}
} }