widget_categories_args

過濾鉤子
apply_filters( 'widget_categories_args', $cat_args, $instance )
引數
  • (array) $cat_args An array of Categories widget options.
    Required:
  • (array) $instance Array of settings for the current widget.
    Required:
定義位置
相關勾子
widget_categories_dropdown_argswidget_pages_argswidget_archives_argswidget_comments_argsget_terms_args
相關方法
get_categoriesget_category_parentswp_list_categorieswp_get_post_categoriesget_the_category_rsswp_create_categories
引入
4.9.0
棄用
-

widget_categories_args是 WordPress 中的過濾器鉤子,它允許開發人員修改在查詢 Categories 小工具的類別時使用的引數。此鉤子用於類別小工具的上下文中,該小工具顯示 WordPress 站點上的類別列表。

過濾類別小工具的引數。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
wp_list_categories( apply_filters( 'widget_categories_args', $cat_args, $instance ) );
wp_list_categories( apply_filters( 'widget_categories_args', $cat_args, $instance ) );
wp_list_categories( apply_filters( 'widget_categories_args', $cat_args, $instance ) );

常見問題

FAQs
檢視更多 >