SimplePie::get_item_quantity()
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() SimplePie::get item quantity WP 6.5.2
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; }