WordPress at Your Fingertips
function is not described

SimplePie_Item::get_category() public WP 3

Get a category for the item

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

No Hooks.

Return

SimplePie_Category|null.

Usage

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

Changelog

Since 3 Introduced.
Since Beta 3 (previously called get_categories() Beta 2)

Code of SimplePie_Item::get_category() WP 5.8.2

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

	return null;
}