WordPress at Your Fingertips
function is not described

SimplePie_Parser::split_ns() public WP 1.0

{} It's a method of the class: SimplePie_Parser{}

No Hooks.

Return

null. Nothing.

Usage

$SimplePie_Parser = new SimplePie_Parser();
$SimplePie_Parser->split_ns( $string );
$string (required)
-

Code of SimplePie_Parser::split_ns() WP 5.8.2

public function split_ns($string)
{
	static $cache = array();
	if (!isset($cache[$string]))
	{
		if ($pos = strpos($string, $this->separator))
		{
			static $separator_length;
			if (!$separator_length)
			{
				$separator_length = strlen($this->separator);
			}
			$namespace = substr($string, 0, $pos);
			$local_name = substr($string, $pos + $separator_length);
			if (strtolower($namespace) === SIMPLEPIE_NAMESPACE_ITUNES)
			{
				$namespace = SIMPLEPIE_NAMESPACE_ITUNES;
			}

			// Normalize the Media RSS namespaces
			if ($namespace === SIMPLEPIE_NAMESPACE_MEDIARSS_WRONG ||
				$namespace === SIMPLEPIE_NAMESPACE_MEDIARSS_WRONG2 ||
				$namespace === SIMPLEPIE_NAMESPACE_MEDIARSS_WRONG3 ||
				$namespace === SIMPLEPIE_NAMESPACE_MEDIARSS_WRONG4 ||
				$namespace === SIMPLEPIE_NAMESPACE_MEDIARSS_WRONG5 )
			{
				$namespace = SIMPLEPIE_NAMESPACE_MEDIARSS;
			}
			$cache[$string] = array($namespace, $local_name);
		}
		else
		{
			$cache[$string] = array('', $string);
		}
	}
	return $cache[$string];
}