theme_scandir_exclusions

過濾鉤子
apply_filters( 'theme_scandir_exclusions', array( 'CVS', 'node_modules', 'vendor', 'bower_components' )

theme_scandir_exclusions是WordPress的一個過濾器鉤子,它允許你在WordPress掃描你的主題目錄時排除特定目錄。預設情況下,WordPress會掃描主題目錄來尋找模板檔案。這個鉤子允許你把特定的目錄從掃描過程中排除掉。

掃描主題資料夾時過濾排除的目錄和檔案的陣列。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
$exclusions = (array) apply_filters( 'theme_scandir_exclusions', array( 'CVS', 'node_modules', 'vendor', 'bower_components' ) );
$exclusions = (array) apply_filters( 'theme_scandir_exclusions', array( 'CVS', 'node_modules', 'vendor', 'bower_components' ) );
$exclusions = (array) apply_filters( 'theme_scandir_exclusions', array( 'CVS', 'node_modules', 'vendor', 'bower_components' ) );

常見問題

FAQs
檢視更多 >