the_category_rss

Filters all of the post categories for display in a feed.

Description

apply_filters( 'the_category_rss', (string) $the_list, (string) $type ); 

Parameters (2)

0. $the_list (string)
All of the RSS post categories.
1. $type (string)
Type of feed. Possible values include rss2,, atom.. Default rss2,.

Usage

To run the hook, copy the example below.
  1. $the_list = apply_filters( 'the_category_rss', $the_list, $type ); 
  2.  
  3. if ( !empty( $the_list ) ) { 
  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_rss callback 
  2. function filter_the_category_rss( $the_list, $type ) { 
  3. // make filter magic happen here... 
  4. return $the_list
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'the_category_rss', 'filter_the_category_rss', 10, 2 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'the_category_rss', 'filter_the_category_rss', 10, 2 ); 

Defined (1)

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

/wp-includes/feed.php  
  1. return apply_filters( 'the_category_rss', $the_list, $type );