How can I get the WordPress language_attributes function to return valid XHTML 1.1?
问题 I have a WordPress template that contains the following element: <html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes('xhtml'); ?>> This returns: <html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en-US" xml:lang="en-US"> Unfortunately the "lang" attribute is invalid XHTML 1.1 - and the client would like this level of validation. WordPress' general-template.php file contains the following code: if ( get_option('html_type') == 'text/html' || $doctype == 'html' )