显示html标记的语言属性。
原型
language_attributes( string $doctype = 'html' )
描述
构建一组html属性,包含页面的文本方向和语言信息。
参数
$doctype
(string)
(Optional)
html文档的类型。接受’xhtml’或’html’。
源文件
路径:wp-includes/general-template.php
<?php
...
function language_attributes( $doctype = 'html' ) {
echo get_language_attributes( $doctype );
}
...
?>
其他
英文文档:https://developer.wordpress.org/reference/functions/language_attributes/