Created
April 23, 2013 19:05
-
-
Save mindmergedesign/5446448 to your computer and use it in GitHub Desktop.
Omega Sub-Theme Doctype
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Implements hook_preprocess_html(). | |
**/ | |
function YOURTHEMENAME_preprocess_html(&$vars) { | |
$vars['doctype'] = '<!DOCTYPE html>' . "\n"; | |
$vars['rdf'] = new stdClass; | |
$vars['rdf']->version = ''; | |
$vars['rdf']->namespaces = ''; | |
$vars['rdf']->profile = ''; | |
// Serialize RDF Namespaces into an RDFa 1.1 prefix attribute. | |
if ($vars['rdf_namespaces']) { | |
$prefixes = array(); | |
foreach (explode("\n ", ltrim($vars['rdf_namespaces'])) as $namespace) { | |
// Remove xlmns: and ending quote and fix prefix formatting. | |
$prefixes[] = str_replace('="', ': ', substr($namespace, 6, -1)); | |
} | |
$vars['rdf']->namespaces = ' prefix="' . implode(' ', $prefixes) . '"'; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment