SimplePie::get_description()publicWP 1.0

Get the content for the item

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

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

Хуков нет.

Возвращает

Строку|null.

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

$SimplePie = new SimplePie();
$SimplePie->get_description();

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

С версии 1.0 Введена.
С версии 1.0 (previously called get_feed_description() since 0.8)

Код SimplePie::get_description() WP 6.1.1

public function get_description()
{
	if ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'subtitle'))
	{
		return $this->sanitize($return[0]['data'], $this->registry->call('Misc', 'atom_10_construct_type', array($return[0]['attribs'])), $this->get_base($return[0]));
	}
	elseif ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_ATOM_03, 'tagline'))
	{
		return $this->sanitize($return[0]['data'], $this->registry->call('Misc', 'atom_03_construct_type', array($return[0]['attribs'])), $this->get_base($return[0]));
	}
	elseif ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_RSS_10, 'description'))
	{
		return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_MAYBE_HTML, $this->get_base($return[0]));
	}
	elseif ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_RSS_090, 'description'))
	{
		return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_MAYBE_HTML, $this->get_base($return[0]));
	}
	elseif ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'description'))
	{
		return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_HTML, $this->get_base($return[0]));
	}
	elseif ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_DC_11, 'description'))
	{
		return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT);
	}
	elseif ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_DC_10, 'description'))
	{
		return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT);
	}
	elseif ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_ITUNES, 'summary'))
	{
		return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_HTML, $this->get_base($return[0]));
	}
	elseif ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_ITUNES, 'subtitle'))
	{
		return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_HTML, $this->get_base($return[0]));
	}

	return null;
}