view_mode_post_types

過濾鉤子
apply_filters( 'view_mode_post_types', $view_mode_post_types )
引數
  • (string[]) $view_mode_post_types Array of post types that can change view modes. Default post types with show_ui on.
    Required:
定義位置
相關勾子
wp_sitemaps_post_typesrest_prepare_post_typeregister_post_type_argsrest_route_for_post_type_itemstheme_post_type_templates
相關方法
get_post_typesremove_post_type_supportget_post_typeset_post_typewp_set_post_termswp_get_post_terms
引入
4.4.0
棄用
-

view_mode_post_types 是一個 WordPress 過濾器,允許開發人員指定支援“檢視模式”功能的文章型別。 此功能允許使用者在文章的不同顯示模式之間切換,例如列表檢視或網格檢視。

過濾具有不同檢視模式選項的文章型別。

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

常見問題

FAQs
檢視更多 >