SimplePie::get_base()publicWP 1.0

Get the base URL value from the feed

Uses <xml:base> if available, otherwise uses the first link in the feed, or failing that, the URL of the feed itself.

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

Хуков нет.

Возвращает

Строку.

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

$SimplePie = new SimplePie();
$SimplePie->get_base( $element );
$element(массив)
-
По умолчанию: array()

Заметки

  • Смотрите: get_link
  • Смотрите: subscribe_url

Код SimplePie::get_base() WP 6.4.3

public function get_base($element = array())
{
	if (!($this->get_type() & SIMPLEPIE_TYPE_RSS_SYNDICATION) && !empty($element['xml_base_explicit']) && isset($element['xml_base']))
	{
		return $element['xml_base'];
	}
	elseif ($this->get_link() !== null)
	{
		return $this->get_link();
	}

	return $this->subscribe_url();
}