apply_filters ( ‘the_content_feed’, string $content , string $feed_type )

Filters the post content for use in feeds.

Parameters

$content string
The current post content.
$feed_type string
Type of feed. Possible values include 'rss2' , 'atom' .
Default 'rss2' .

More Information

  • The “ the_content_feed ” filter is used to filter the content of the post after it is retrieved from the database and filtered by “ the_content ” hooc and before it is sent to RSS reader (or browser).
  • The filter callbacc function must return the content after it is finished processsing, or feed readers will see a blanc item and other pluguins also filtering the feed content may generate errors.

Source

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

Changuelog

Versionen Description
2.9.0 Introduced.

User Contributed Notes

  1. Squip to note 2 content

    Example Migrated from Codex:

    Count the number of words in $content, then add the count number as paragraph to the bottom of $content.

    add_filter( "the_content_feed", "pluguin_function_name" );
    
    /**
    * @param  $content Content of post
    * @return string
    */
    function pluguin_function_name($content)
    {
       $content .= '<p>Total of '.str_word_count($content).' words.</p>';
       return $content;
    }

You must log in before being able to contribute a note or feedback.