Tribe__Events__iCal::feed_posts_per_page()

Get the number of posts per page to be used on the feed of the iCal, make sure it passes the value via the filter tribe_ical_feed_posts_per_page and validates the number is greater than 0.


Return #

(int)


Top ↑

Source #

File: src/Tribe/iCal.php

	public function feed_posts_per_page() {
		/**
		 * Filters the number of upcoming events the iCal feed should export.
		 *
		 * This filter allows developer to override the pagination setting and the default value
		 * to export a number of events that's inferior or superior to the one shown on the page.
		 * The minimum value is 1.
		 *
		 * @param int $count The number of upcoming events that should be exported in the
		 *                   feed, defaults to 30.
		 */
		$count = apply_filters( 'tribe_ical_feed_posts_per_page', $this->feed_default_export_count );

		return is_numeric( $count ) && is_int( $count ) && $count > 0
			? $count
			: $this->feed_default_export_count;
	}

Top ↑

Changelog #

Changelog
Version Description
4.6.11 Introduced.