moduleExists('rdf')) { $namespaces = [ 'xmlns:dc' => 'http://purl.org/dc/terms/', 'xmlns:og' => 'http://ogp.me/ns#', ]; } // Namespaces for OpenGraph. $namespaces['xmlns:article'] = "http://ogp.me/ns/article#"; $namespaces['xmlns:book'] = "http://ogp.me/ns/book#"; $namespaces['xmlns:product'] = "http://ogp.me/ns/product#"; $namespaces['xmlns:profile'] = "http://ogp.me/ns/profile#"; $namespaces['xmlns:video'] = "http://ogp.me/ns/video#"; // Namespaces for Google+. if (isset($variables['itemtype'])) { $namespaces['itemscope'] = ''; $namespaces['itemtype'] = "http://schema.org/{$variables['itemtype']}"; } // Append each namespace. foreach ($namespaces as $namespace => $uri) { $variables['html_attributes'][$namespace] = $uri; } }