language_attributes

函式
language_attributes ( $doctype = 'html' )
引數
  • (string) $doctype Optional. The type of HTML document. Accepts 'xhtml' or 'html'. Default 'html'.
    Required:
    Default: 'html'
定義位置
相關方法
get_language_attributespage_attributes_meta_boxthe_title_attributewp_kses_uri_attributeswp_sanitize_script_attributes
引入
2.1.0
棄用
-

language_attributes: 這是WordPress的一個函式,用於輸出當前頁面的HTML語言屬性。它可以在你的主題的模板檔案中使用,以指定頁面內容的語言。

顯示’html’標籤的語言屬性。

建立一套HTML屬性,包含頁面的文字方向和語言資訊。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
function language_attributes( $doctype = 'html' ) {
echo get_language_attributes( $doctype );
}
function language_attributes( $doctype = 'html' ) { echo get_language_attributes( $doctype ); }
function language_attributes( $doctype = 'html' ) {
	echo get_language_attributes( $doctype );
}

常見問題

FAQs
檢視更多 >