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

SimplePie::get_language() WP 1.0

Get the language for the feed

Uses <language>, <dc:language>, or @xml_lang

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

Хуков нет.

Возвращает

Строку/null.

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

$SimplePie = new SimplePie();
$var = $SimplePie->get_language();

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

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

Код SimplePie::get language: wp-includes/class-simplepie.php WP 5.2.2

<?php
public function get_language()
{
	if ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'language'))
	{
		return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT);
	}
	elseif ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_DC_11, 'language'))
	{
		return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT);
	}
	elseif ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_DC_10, 'language'))
	{
		return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT);
	}
	elseif (isset($this->data['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['feed'][0]['xml_lang']))
	{
		return $this->sanitize($this->data['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['feed'][0]['xml_lang'], SIMPLEPIE_CONSTRUCT_TEXT);
	}
	elseif (isset($this->data['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['feed'][0]['xml_lang']))
	{
		return $this->sanitize($this->data['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['feed'][0]['xml_lang'], SIMPLEPIE_CONSTRUCT_TEXT);
	}
	elseif (isset($this->data['child'][SIMPLEPIE_NAMESPACE_RDF]['RDF'][0]['xml_lang']))
	{
		return $this->sanitize($this->data['child'][SIMPLEPIE_NAMESPACE_RDF]['RDF'][0]['xml_lang'], SIMPLEPIE_CONSTRUCT_TEXT);
	}
	elseif (isset($this->data['headers']['content-language']))
	{
		return $this->sanitize($this->data['headers']['content-language'], SIMPLEPIE_CONSTRUCT_TEXT);
	}
	else
	{
		return null;
	}
}