ical = $ical ?: tribe( 'tec.iCal' ); $this->context = $context ?: tribe_context(); } /** * Returns the ordered list of event post IDs that match the current * iCalendar export request. * * @since 4.6.0 * * @return array A list of event post IDs that match the current * iCalendar export request. */ public function get_event_ids() { $view_slug = $this->context->get( 'view', 'default' ); if ( 'single-event' !== $view_slug ) { $view = View::make( $view_slug, $this->context ); $event_ids = $view->get_ical_ids( $this->ical->feed_posts_per_page() ); } else { $event_ids = [ $this->context->get( 'post_id' ) ]; } return $event_ids; } }