SimplePie::get_item_quantity()publicWP 1.0

Get the number of items in the feed

This is well-suited for for() loops with {@see get_item()}

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

Хуков нет.

Возвращает

int. Number of items in the feed

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

$SimplePie = new SimplePie();
$SimplePie->get_item_quantity( $max );
$max(int)
Maximum value to return. 0 for no limit

Код SimplePie::get_item_quantity() WP 6.1.1

public function get_item_quantity($max = 0)
{
	$max = (int) $max;
	$qty = count($this->get_items());
	if ($max === 0)
	{
		return $qty;
	}

	return ($qty > $max) ? $max : $qty;
}