get_the_content_feed

The timeline below displays how wordpress function get_the_content_feed has changed across different WordPress versions. If a version is not listed, refer to the next available version below.

WordPress Version: 6.1

/**
 * Retrieves the post content for feeds.
 *
 * @since 2.9.0
 *
 * @see get_the_content()
 *
 * @param string $feed_type The type of feed. rss2 | atom | rss | rdf
 * @return string The filtered content.
 */
function get_the_content_feed($feed_type = null)
{
    if (!$feed_type) {
        $feed_type = get_default_feed();
    }
    /** This filter is documented in wp-includes/post-template.php */
    $content = apply_filters('the_content', get_the_content());
    $content = str_replace(']]>', ']]>', $content);
    /**
     * Filters the post content for use in feeds.
     *
     * @since 2.9.0
     *
     * @param string $content   The current post content.
     * @param string $feed_type Type of feed. Possible values include 'rss2', 'atom'.
     *                          Default 'rss2'.
     */
    return apply_filters('the_content_feed', $content, $feed_type);
}

WordPress Version: 5.5

/**
 * Retrieve the post content for feeds.
 *
 * @since 2.9.0
 *
 * @see get_the_content()
 *
 * @param string $feed_type The type of feed. rss2 | atom | rss | rdf
 * @return string The filtered content.
 */
function get_the_content_feed($feed_type = null)
{
    if (!$feed_type) {
        $feed_type = get_default_feed();
    }
    /** This filter is documented in wp-includes/post-template.php */
    $content = apply_filters('the_content', get_the_content());
    $content = str_replace(']]>', ']]>', $content);
    /**
     * Filters the post content for use in feeds.
     *
     * @since 2.9.0
     *
     * @param string $content   The current post content.
     * @param string $feed_type Type of feed. Possible values include 'rss2', 'atom'.
     *                          Default 'rss2'.
     */
    return apply_filters('the_content_feed', $content, $feed_type);
}

WordPress Version: 4.6

/**
 * Retrieve the post content for feeds.
 *
 * @since 2.9.0
 * @see get_the_content()
 *
 * @param string $feed_type The type of feed. rss2 | atom | rss | rdf
 * @return string The filtered content.
 */
function get_the_content_feed($feed_type = null)
{
    if (!$feed_type) {
        $feed_type = get_default_feed();
    }
    /** This filter is documented in wp-includes/post-template.php */
    $content = apply_filters('the_content', get_the_content());
    $content = str_replace(']]>', ']]>', $content);
    /**
     * Filters the post content for use in feeds.
     *
     * @since 2.9.0
     *
     * @param string $content   The current post content.
     * @param string $feed_type Type of feed. Possible values include 'rss2', 'atom'.
     *                          Default 'rss2'.
     */
    return apply_filters('the_content_feed', $content, $feed_type);
}

WordPress Version: 4.0

/**
 * Retrieve the post content for feeds.
 *
 * @since 2.9.0
 * @see get_the_content()
 *
 * @param string $feed_type The type of feed. rss2 | atom | rss | rdf
 * @return string The filtered content.
 */
function get_the_content_feed($feed_type = null)
{
    if (!$feed_type) {
        $feed_type = get_default_feed();
    }
    /** This filter is documented in wp-includes/post-template.php */
    $content = apply_filters('the_content', get_the_content());
    $content = str_replace(']]>', ']]>', $content);
    /**
     * Filter the post content for use in feeds.
     *
     * @since 2.9.0
     *
     * @param string $content   The current post content.
     * @param string $feed_type Type of feed. Possible values include 'rss2', 'atom'.
     *                          Default 'rss2'.
     */
    return apply_filters('the_content_feed', $content, $feed_type);
}

WordPress Version: 3.9

/**
 * Retrieve the post content for feeds.
 *
 * @since 2.9.0
 * @see get_the_content()
 *
 * @param string $feed_type The type of feed. rss2 | atom | rss | rdf
 * @return string The filtered content.
 */
function get_the_content_feed($feed_type = null)
{
    if (!$feed_type) {
        $feed_type = get_default_feed();
    }
    /** This filter is documented in wp-admin/post-template.php */
    $content = apply_filters('the_content', get_the_content());
    $content = str_replace(']]>', ']]>', $content);
    /**
     * Filter the post content for use in feeds.
     *
     * @since 2.9.0
     *
     * @param string $content   The current post content.
     * @param string $feed_type Type of feed. Possible values include 'rss2', 'atom'.
     *                          Default 'rss2'.
     */
    return apply_filters('the_content_feed', $content, $feed_type);
}

WordPress Version: 3.7

/**
 * Retrieve the post content for feeds.
 *
 * @package WordPress
 * @subpackage Feed
 * @since 2.9.0
 * @uses apply_filters() Calls 'the_content_feed' on the content before processing.
 * @see get_the_content()
 *
 * @param string $feed_type The type of feed. rss2 | atom | rss | rdf
 * @return string The filtered content.
 */
function get_the_content_feed($feed_type = null)
{
    if (!$feed_type) {
        $feed_type = get_default_feed();
    }
    $content = apply_filters('the_content', get_the_content());
    $content = str_replace(']]>', ']]>', $content);
    return apply_filters('the_content_feed', $content, $feed_type);
}