widget_categories_args WordPress Filter Hook
The widget_categories_args hook allows you to modify the arguments used in the wp_list_categories() function. This can be useful if you want to change the order of the categories, or exclude certain categories from the list.
apply_filters( 'widget_categories_args', array $cat_args , array $instance ) #
Filters the arguments for the Categories widget.
Parameters
- $cat_args
(array)An array of Categories widget options.
- $instance
(array)Array of settings for the current widget.
More Information
This filter is used by the default “WordPress Widget: Categories” before it passes arguments to the wp_list_categories() function.
Source
Changelog
Version | Description |
---|---|
4.9.0 | Added the $instance parameter. |
2.8.0 | Introduced. |