WordPress at a glance

get_the_content_feed() WP 1.0

Retrieve the post content for feeds.

  • See: get_the_content()
Works based on: get_the_content()
✈ 1 time = 0.001937s = very slow | 50000 times = 8.21s = fast PHP 7.0.8, WP 4.6.1
Hooks from function:
Return

String. The filtered content.

Usage

get_the_content_feed( $feed_type );
$feed_type(string)
The type of feed. rss2 | atom | rss | rdf
Default: null

Code of get_the_content_feed: wp-includes/feed.php VER 4.9.8

<?php
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(']]>', ']]&gt;', $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 );
}

Related Functions

From category: Feeds

No comments
    Hello, !     Log In . Register