From a plugin, how do you add a namespace?
Example:
Before:
<html xmlns="http://www.w3.org/1999/xhtml">
After:
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:xsi="http://example.org/schema/">
Thanks
From a plugin, how do you add a namespace?
Example:
Before:
<html xmlns="http://www.w3.org/1999/xhtml">
After:
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:xsi="http://example.org/schema/">
Thanks
You can use this if language_attributes() exists inside html tag.
add_filter('language_attributes', 'schema');
function schema($attr) {
$attr .= "\n xmlns:xsi=\"http://example.org/schema/\"";
return $attr;
}Worked like a charm, thanks!
and if it doesn't?
This topic has been closed to new replies.