WordPress at Your Fingertips
function is not described

SimplePie_Item::get_content() public WP 1.0

Get the content for the item

Prefers full content over summaries, but will return a summary if full content does not exist.

To prefer summaries instead, use {@see get_description}

Uses <atom:content> or <content:encoded> (RSS 1.0 Content Module)

{} It's a method of the class: SimplePie_Item{}

No Hooks.

Return

String|null.

Usage

$SimplePie_Item = new SimplePie_Item();
$SimplePie_Item->get_content( $content_only );
$content_only(true|false)
Should we avoid falling back to the description?
Default: false

Changelog

Since 1.0 Introduced.

Code of SimplePie_Item::get_content() WP 5.8.2

public function get_content($content_only = false)
{
	if (($tags = $this->get_item_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'content')) &&
	    ($return = $this->sanitize($tags[0]['data'], $this->registry->call('Misc', 'atom_10_content_construct_type', array($tags[0]['attribs'])), $this->get_base($tags[0]))))
	{
		return $return;
	}
	elseif (($tags = $this->get_item_tags(SIMPLEPIE_NAMESPACE_ATOM_03, 'content')) &&
	        ($return = $this->sanitize($tags[0]['data'], $this->registry->call('Misc', 'atom_03_construct_type', array($tags[0]['attribs'])), $this->get_base($tags[0]))))
	{
		return $return;
	}
	elseif (($tags = $this->get_item_tags(SIMPLEPIE_NAMESPACE_RSS_10_MODULES_CONTENT, 'encoded')) &&
	        ($return = $this->sanitize($tags[0]['data'], SIMPLEPIE_CONSTRUCT_HTML, $this->get_base($tags[0]))))
	{
		return $return;
	}
	elseif (!$content_only)
	{
		return $this->get_description(true);
	}

	return null;
}