Filter hook 'the_category_rss'

in WP Core File wp-includes/feed.php at line 428

View Source

the_category_rss

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

Hook Information

File Location wp-includes/feed.php View on GitHub
Hook Type Filter
Line Number 428

Hook Parameters

Type Name Description
string $the_list All of the RSS post categories.
string $type Type of feed. Possible values include 'rss2', 'atom'. Default 'rss2'.

Usage Examples

Basic Usage
<?php
// Hook into the_category_rss
add_filter('the_category_rss', 'my_custom_filter', 10, 2);

function my_custom_filter($the_list, $type) {
    // Your custom filtering logic here
    return $the_list;
}

Source Code Context

wp-includes/feed.php:428 - How this hook is used in WordPress core
<?php
 423  	 *
 424  	 * @param string $the_list All of the RSS post categories.
 425  	 * @param string $type     Type of feed. Possible values include 'rss2', 'atom'.
 426  	 *                         Default 'rss2'.
 427  	 */
 428  	return apply_filters( 'the_category_rss', $the_list, $type );
 429  }
 430  
 431  /**
 432   * Displays the post categories in the feed.
 433   *

PHP Documentation

<?php
/**
	 * Filters all of the post categories for display in a feed.
	 *
	 * @since 1.2.0
	 *
	 * @param string $the_list All of the RSS post categories.
	 * @param string $type     Type of feed. Possible values include 'rss2', 'atom'.
	 *                         Default 'rss2'.
	 */
Quick Info
  • Hook Type: Filter
  • Parameters: 2
  • File: wp-includes/feed.php
Related Hooks

Related hooks will be displayed here in future updates.