More generic code

This commit is contained in:
Laurent Destailleur 2019-07-25 15:07:00 +02:00
parent 351b877c05
commit fe22f11f10

View File

@ -438,13 +438,12 @@ function includeContainer($containerref)
* Return HTML content to add structured data for an article, news or Blog Post. * Return HTML content to add structured data for an article, news or Blog Post.
* *
* @param string $type 'blogpost', 'product', 'software'... * @param string $type 'blogpost', 'product', 'software'...
* @param WebsitePage $websitepage Website page object
* @param array $data Array of data parameters for structured data * @param array $data Array of data parameters for structured data
* @return string HTML content * @return string HTML content
*/ */
function getStructuredData($type, WebsitePage $websitepage, $data = array()) function getStructuredData($type, $data = array())
{ {
global $conf, $db, $hookmanager, $langs, $mysoc, $user, $website, $weblangs; // Very important. Required to have var available when running inluded containers. global $conf, $db, $hookmanager, $langs, $mysoc, $user, $website, $websitepage, $weblangs; // Very important. Required to have var available when running inluded containers.
global $includehtmlcontentopened; global $includehtmlcontentopened;
global $websitekey, $websitepagefile; global $websitekey, $websitepagefile;