category_description
Filters the category description for display.
Usage
add_filter( 'category_description', 'wp_kama_category_description_filter', 10, 2 ); /** * Function for `category_description` filter-hook. * * @param string $description Category description. * @param WP_Term $category Category object. * * @return string */ function wp_kama_category_description_filter( $description, $category ){ // filter... return $description; }
- $description(string)
- Category description.
- $category(WP_Term)
- Category object.
Changelog
Since 1.2.0 | Introduced. |
Where the hook is called
wp-includes/class-walker-category.php 125
$atts['title'] = strip_tags( apply_filters( 'category_description', $category->description, $category ) );