the_content_feed
Filters the post content for use in feeds.
Usage
add_filter( 'the_content_feed', 'wp_kama_the_content_feed_filter', 10, 2 ); /** * Function for `the_content_feed` filter-hook. * * @param string $content The current post content. * @param string $feed_type Type of feed. Possible values include 'rss2', 'atom'. * * @return string */ function wp_kama_the_content_feed_filter( $content, $feed_type ){ // filter... return $content; }
- $content(string)
- The current post content.
- $feed_type(string)
- Type of feed. Possible values include 'rss2', 'atom'.
Default: 'rss2'
Changelog
Since 2.9.0 | Introduced. |
Where the hook is called
the_content_feed
wp-includes/feed.php 206
return apply_filters( 'the_content_feed', $content, $feed_type );
Where the hook is used in WordPress
wp-includes/default-filters.php 251
add_filter( 'the_content_feed', 'wp_staticize_emoji' );
wp-includes/default-filters.php 252
add_filter( 'the_content_feed', '_oembed_filter_feed_content' );