Hello I\'am get this error on w3c,因为xmlns
已弃用。
如何删除xmlns
?
属性xmlns:此处不允许fb
<html lang="en-US" xmlns:fb="http://ogp.me/ns/fb#" xmlns:addthis="http://www.addthis.com/help/api-spec" prefix="og: http://ogp.me/ns#">
我的代码是
<html <?php language_attributes(); ?>>
function get_language_attributes( $doctype = \'html\' ) {
$attributes = array();
if ( function_exists( \'is_rtl\' ) && is_rtl() )
$attributes[] = \'dir="rtl"\';
if ( $lang = get_bloginfo(\'language\') ) {
if ( get_option(\'html_type\') == \'text/html\' || $doctype == \'html\' )
$attributes[] = "lang=\\"$lang\\"";
if ( get_option(\'html_type\') != \'text/html\' || $doctype == \'xhtml\' )
$attributes[] = "xml:lang=\\"$lang\\"";
}
$output = implode(\' \', $attributes);
/**
* Filters the language attributes for display in the html tag.
*
* @since 2.5.0
* @since 4.3.0 Added the `$doctype` parameter.
*
* @param string $output A space-separated list of language attributes.
* @param string $doctype The type of html document (xhtml|html).
*/
return apply_filters( \'language_attributes\', $output, $doctype );
}