language_attributes
apply_filters( ‘language_attributes’, string $output , string $doctype )
过滤器::过滤要在html标记中显示的语言属性。
Filter Hook: Filters the language attributes for display in the html tag.
参数(Parameters)
参数 | 类型 | 说明 |
---|---|---|
$output | (string) | 用空格分隔的语言属性列表。 |
$doctype | (string) | html文档的类型(xhtml | html)。 |
源码(Source)
/** * Displays the language attributes for the html tag. * * Builds up a set of html attributes containing the text direction and language * information for the page. * * @since 2.1.0 * @since 4.3.0 Converted into a wrapper for get_language_attributes(). * * @param string $doctype Optional. The type of html document. Accepts 'xhtml' or 'html'. Default 'html'. */ function language_attributes( $doctype = 'html' ) { echo get_language_attributes( $doctype ); }
更新版本 | 源码位置 | 使用 | 被使用 |
---|---|---|---|
4.3.0 | wp-includes/general-template.php:3970 | 1 | 0 |
language_attributes 为WP2原创文章,链接:https://www.wp2.cn/hook/language_attributes-2/