the_content_feed

Filters the post content for use in feeds.

Description

apply_filters( 'the_content_feed', (string) $content, (string) $feed_type ); 

Parameters (2)

0. $content (string)
The current post content.
1. $feed_type (string)
Type of feed. Possible values include rss2,, atom.. Default rss2,.

Usage

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

Defined (3)

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

/wp-includes/feed.php  
  1. return apply_filters( 'the_content_feed', $content, $feed_type ); 
/wp-includes/default-filters.php  
  1. add_filter( 'the_content_feed', 'wp_staticize_emoji' ); 
  1. add_filter( 'the_content_feed', '_oembed_filter_feed_content' );