category_description filter-hookWP 1.2.0

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

Walker_Category::start_el()
category_description
wp-includes/class-walker-category.php 125
$atts['title'] = strip_tags( apply_filters( 'category_description', $category->description, $category ) );

Where the hook is used in WordPress

Usage not found.