feed_content_type
Filters the content type for a specific feed type.
Usage
add_filter( 'feed_content_type', 'wp_kama_feed_content_type_filter', 10, 2 );
/**
* Function for `feed_content_type` filter-hook.
*
* @param string $content_type Content type indicating the type of data that a feed contains.
* @param string $type Type of feed. Possible values include 'rss', rss2', 'atom', and 'rdf'.
*
* @return string
*/
function wp_kama_feed_content_type_filter( $content_type, $type ){
// filter...
return $content_type;
}
- $content_type(string)
- Content type indicating the type of data that a feed contains.
- $type(string)
- Type of feed. Possible values include 'rss', rss2', 'atom', and 'rdf'.
Changelog
| Since 2.8.0 | Introduced. |
Where the hook is called
feed_content_type
wp-includes/feed.php 791
return apply_filters( 'feed_content_type', $content_type, $type );