W3C Validator Error Fix
-
Hello,
This plugin does not spit out code that will Validate via a W3C validater. This small chunk of code for functions.php will fix that:
function my_plugins_loaded() { // add-meta-tags changes remove_filter('language_attributes','amt_add_og_xml_namespace'); } add_action('plugins_loaded','my_plugins_loaded'); // add-meta-tags changes function my_add_og_xml_namespace ($content) { return ' xmlns="https://www.w3.org/1999/xhtml" prefix="og: https://ogp.me/ns# fb: https://www.facebook.com/2008/fbml" ' . $content; } add_filter('language_attributes','my_add_og_xml_namespace',5);
In effect it is removing the language_attributes filter added by add-meta-tags and replacing it with W3C validated text that does the same thing but passes the tests.
Other than this easy to fix issue, I really like the plugin! Need to play some more.
–Edward
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘W3C Validator Error Fix’ is closed to new replies.