get_the_content_feed

Advertisement

Summery Summery

Retrieve the post content for feeds.

Syntax Syntax

get_the_content_feed( string $feed_type = null )

Parameters Parameters

$feed_type

(Optional) The type of feed. rss2 | atom | rss | rdf

Default value: null

Return Return

(string) The filtered content.

Source Source

File: wp-includes/feed.php

 * @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'.

Advertisement

Changelog Changelog

Changelog
Version Description
2.9.0 Introduced.

See also See also

Advertisement

Leave a Reply