pre_get_document_title

過濾鉤子
apply_filters( 'pre_get_document_title', '' )

pre_get_document_title是一個過濾鉤子,允許你在WordPress檢索和使用之前修改文件的標題(顯示在瀏覽器視窗的標題)。

在生成文件標題之前過濾文件標題。

傳遞非空值將短路wp_get_document_title(),而返回該值。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
$title = apply_filters( 'pre_get_document_title', '' );
$title = apply_filters( 'pre_get_document_title', '' );
$title = apply_filters( 'pre_get_document_title', '' );

常見問題

FAQs
檢視更多 >