list_cats filter-hook . WP 1.2.0
Filters a taxonomy drop-down display element.
A variety of taxonomy drop-down display elements can be modified just prior to display via this filter. Filterable arguments include 'show_option_none', 'show_option_all', and various forms of the term name.
Usage
add_filter( 'list_cats', 'filter_function_name_8524', 10, 2 ); function filter_function_name_8524( $element, $category ){ // filter... return $element; }
- $element(string)
- Category name.
- $category(WP_Term|null)
- The category object, or null if there's no corresponding category.
Changelog
Since 1.2.0 | Introduced. |
Where the hook is called
list_cats
list_cats
wp-includes/category-template.php 426
$show_option_none = apply_filters( 'list_cats', $parsed_args['show_option_none'], null );
wp-includes/category-template.php 435
$show_option_all = apply_filters( 'list_cats', $parsed_args['show_option_all'], null );
wp-includes/category-template.php 443
$show_option_none = apply_filters( 'list_cats', $parsed_args['show_option_none'], null );
wp-includes/class-walker-category-dropdown.php 61
$cat_name = apply_filters( 'list_cats', $category->name, $category );
wp-includes/class-walker-category.php 100
$cat_name = apply_filters( 'list_cats', esc_attr( $category->name ), $category );
Where in WP core the hook is used WordPress
wp-includes/default-filters.php 201
add_filter( 'list_cats', 'wptexturize' );