wp_theme_editor_filetypes

過濾鉤子
apply_filters( 'wp_theme_editor_filetypes', $default_types, $theme )
引數
  • (string[]) $default_types An array of editable theme file extensions.
    Required:
  • (WP_Theme) $theme The active theme object.
    Required:
定義位置
相關勾子
wp_save_image_editor_filewp_code_editor_settingswp_generator_typethe_editor_contentwp_editor_settings
相關方法
wp_check_filetyperemove_editor_styleswp_check_widget_editor_depswp_make_theme_file_treewp_get_ext_typespreview_theme_ob_filter
引入
4.4.0
棄用
-

wp_theme_editor_filetypes: 這是一個 WordPress 函式,它用於設定主題編輯器支援的檔案型別: 該函式生成一個檔案型別陣列,您可以使用此陣列確定哪些檔案型別可以在主題編輯器中編輯。

過濾允許在主題檔案編輯器中編輯的檔案型別列表。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
$file_types = apply_filters( 'wp_theme_editor_filetypes', $default_types, $theme );
$file_types = apply_filters( 'wp_theme_editor_filetypes', $default_types, $theme );
$file_types = apply_filters( 'wp_theme_editor_filetypes', $default_types, $theme );

常見問題

FAQs
檢視更多 >