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.

Method of the class: SimplePie{}

No Hooks.

Return

String.

Usage

$SimplePie = new SimplePie();
$SimplePie->get_base( $element );
$element(array)
-
Default: array()

Notes

SimplePie::get_base() code WP 6.5.2

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();
}