twentysixteen_content_width

過濾鉤子
apply_filters( 'twentysixteen_content_width', 840 )

twentysixteen_content_width – 此函式用於指定 Twenty Sixteen 主題中的內容寬度: 該函式返回內容區的寬度,用於確定主題中主要內容欄的大小。

設定主題預設值並註冊對各種WordPress功能的支援。

注意,這個函式被掛在after_setup_theme鉤上,它在init鉤之前執行。對於某些功能來說,init鉤子太晚了,例如表明對文章縮圖的支援。

建立你自己的 twentysixteen_setup() 函式來覆蓋子主題。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
$GLOBALS['content_width'] = apply_filters( 'twentysixteen_content_width', 840 );
$GLOBALS['content_width'] = apply_filters( 'twentysixteen_content_width', 840 );
$GLOBALS['content_width'] = apply_filters( 'twentysixteen_content_width', 840 );

常見問題

FAQs
檢視更多 >