the_category

This filter is documented in wp-includes/category-template.php.

Description

apply_filters( 'the_category', (unknown) $category_description ); 

Parameters (1)

0. $category_description (unknown)
The category description.

Usage

To run the hook, copy the example below.
  1. $category_description = apply_filters( 'the_category', $category_description ); 
  2.  
  3. if ( !empty( $category_description ) ) { 
  4.  
  5. // everything has led up to this point... 
  6.  
  7.  
The following example is for adding a hook callback.
  1. // define the the_category callback 
  2. function filter_the_category( $category_description ) { 
  3. // make filter magic happen here... 
  4. return $category_description
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'the_category', 'filter_the_category', 10, 1 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'the_category', 'filter_the_category', 10, 1 ); 

Defined (2)

The filter is defined in the following location(s).

/bp-core/classes/class-bp-walker-category-checklist.php  
  1. esc_html( apply_filters( 'the_category', $category->description ) ) . '</div>'; 
  1. esc_html( apply_filters( 'the_category', $category->description ) ) . '</label>';