SimplePie::get_category()publicWP 1.0

Get a category for the feed

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

No Hooks.

Return

SimplePie_Category|null.

Usage

$SimplePie = new SimplePie();
$SimplePie->get_category( $key );
$key(int)
The category that you want to return. Remember that arrays begin with 0, not 1

Changelog

Since Unknown

Code of SimplePie::get_category() WP 6.1.1

public function get_category($key = 0)
{
	$categories = $this->get_categories();
	if (isset($categories[$key]))
	{
		return $categories[$key];
	}

	return null;
}