Hooks::inject_ical_event_ids( TribeEventsViewsV2array|false $event_ids = null )

Overrides the default iCalendar export link logic to inject a list of event post IDs fitting the Views V2 criteria.


Parameters #

$event_ids

(<span class="TribeEventsViewsV2array">TribeEventsViewsV2array|false) (Optional) Either a list of event post IDs that has been explicitly requested or false to indicate the iCalendar export link did not indicate a specific set of event post IDs.

Default value: null


Top ↑

Return #

(TribeEventsViewsV2array<int>) Either the original input value if a specific set of event post IDs was requested as part of the iCalendar export link, or a filtered set of event post IDs compiled depending on the current View context and request arguments.


Top ↑

Source #

File: src/Tribe/Views/V2/Hooks.php

	public function inject_ical_event_ids( $event_ids = null ) {
		if ( false !== $event_ids ) {
			// The request already specifies a set of Event post IDs to return, bail.
			return $event_ids;
		}

		return $this->container->make( iCalendar\Request::class )->get_event_ids();
	}

Top ↑

Changelog #

Changelog
Version Description
4.6.0 Introduced.