SimplePie::get_item_quantity

Advertisement

Summery Summery

Get the number of items in the feed

Syntax Syntax

SimplePie::get_item_quantity( int $max )

Description Description

This is well-suited for for() loops with get_item()

Parameters Parameters

$max

(int) (Required) Maximum value to return. 0 for no limit

Return Return

(int) Number of items in the feed

Source Source

File: wp-includes/class-simplepie.php

		elseif ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_W3C_BASIC_GEO, 'lon'))
		{
			return (float) $return[0]['data'];
		}
		elseif (($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_GEORSS, 'point')) && preg_match('/^((?:-)?[0-9]+(?:\.[0-9]+)) ((?:-)?[0-9]+(?:\.[0-9]+))$/', trim($return[0]['data']), $match))
		{
			return (float) $match[2];
		}

		return null;
	}

	/**

Advertisement

Advertisement

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.