Summery Summery
Get the content for the item
Syntax Syntax
Description Description
Prefers full content over summaries, but will return a summary if full content does not exist.
To prefer summaries instead, use get_description
Uses <atom:content>
or <content:encoded>
(RSS 1.0 Content Module)
Parameters Parameters
- $content_only
-
(Optional) Should we avoid falling back to the description?
Default value: false
Return Return
(string|null)
Source Source
File: wp-includes/SimplePie/Item.php
{ 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; }
Advertisement
Changelog Changelog
Version | Description |
---|---|
1.0 | Introduced. |