get_the_content_feed() – Retrieve the post content for feeds.

You appear to be a bot. Output may be restricted

Description

Retrieves the post content for feeds.

Usage

$string = get_the_content_feed( $feed_type );

Parameters

$feed_type
( string ) optional

Returns

string The filtered content.

Source

File name: wordpress/wp-includes/feed.php
Lines:

1 to 20 of 20
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 );
}
 

 View on GitHub View on Trac

Published:

Last updated:

21st August 2020

Information

API Letters: ,,,
The type of feed. rss2 atom rss rdf