WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru Платформа для конвертации и монетизации трафика
функция не описана

SimplePie_Item::get_description() public WP 0.8

Get the content for the item

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

To prefer full content instead, use {@see get_content}

Uses <atom:summary>, <description>, <dc:description> or <itunes:subtitle>

{} Это метод класса: SimplePie_Item{}

Хуков нет.

Возвращает

Строку/null.

Использование

$SimplePie_Item = new SimplePie_Item();
$SimplePie_Item->get_description( $description_only );
$description_only(true/false)
Should we avoid falling back to the content?
По умолчанию: false

Список изменений

С версии 0.8 Введена.

Код SimplePie_Item::get_description() WP 5.5.3

<?php
public function get_description($description_only = false)
{
	if (($tags = $this->get_item_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'summary')) &&
	    ($return = $this->sanitize($tags[0]['data'], $this->registry->call('Misc', 'atom_10_construct_type', array($tags[0]['attribs'])), $this->get_base($tags[0]))))
	{
		return $return;
	}
	elseif (($tags = $this->get_item_tags(SIMPLEPIE_NAMESPACE_ATOM_03, 'summary')) &&
	        ($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, 'description')) &&
	        ($return = $this->sanitize($tags[0]['data'], SIMPLEPIE_CONSTRUCT_MAYBE_HTML, $this->get_base($tags[0]))))
	{
		return $return;
	}
	elseif (($tags = $this->get_item_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'description')) &&
	        ($return = $this->sanitize($tags[0]['data'], SIMPLEPIE_CONSTRUCT_HTML, $this->get_base($tags[0]))))
	{
		return $return;
	}
	elseif (($tags = $this->get_item_tags(SIMPLEPIE_NAMESPACE_DC_11, 'description')) &&
	        ($return = $this->sanitize($tags[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT)))
	{
		return $return;
	}
	elseif (($tags = $this->get_item_tags(SIMPLEPIE_NAMESPACE_DC_10, 'description')) &&
	        ($return = $this->sanitize($tags[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT)))
	{
		return $return;
	}
	elseif (($tags = $this->get_item_tags(SIMPLEPIE_NAMESPACE_ITUNES, 'summary')) &&
	        ($return = $this->sanitize($tags[0]['data'], SIMPLEPIE_CONSTRUCT_HTML, $this->get_base($tags[0]))))
	{
		return $return;
	}
	elseif (($tags = $this->get_item_tags(SIMPLEPIE_NAMESPACE_ITUNES, 'subtitle')) &&
	        ($return = $this->sanitize($tags[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT)))
	{
		return $return;
	}
	elseif (($tags = $this->get_item_tags(SIMPLEPIE_NAMESPACE_RSS_090, 'description')) &&
	        ($return = $this->sanitize($tags[0]['data'], SIMPLEPIE_CONSTRUCT_HTML)))
	{
		return $return;
	}

	elseif (!$description_only)
	{
		return $this->get_content(true);
	}

	return null;
}