Tribe__Events__Pro__Shortcodes__Register::ical_events_list_args( $args = array() )
Callback attached to the filter tribe_events_ical_events_list_args
to change the set of arguments used to query the Objects used on the iCal feed if the view is not month otherwise is attached to the filter tribe_ical_feed_month_view_query_args
.
Contents
Parameters
- $args
-
(Optional) array
Default value: array()
Return
(array)
Source
File: src/Tribe/Shortcodes/Register.php
public function ical_events_list_args( $args = array() ) { $date = empty( $this->ical_shortcode_attributes['date'] ) ? '' : $this->ical_shortcode_attributes['date']; $view = $this->ical_shortcode_attributes['view']; if ( 'month' === $this->ical_shortcode_attributes['view'] ) { $view = 'custom'; if ( ! empty( $this->ical_shortcode_attributes['date'] ) ) { $args['start_date'] = Tribe__Events__Template__Month::calculate_first_cell_date( $date ); $args['end_date'] = Tribe__Events__Template__Month::calculate_final_cell_date( $date ); } } else { // if we are not in a month view $args should be created from scratch instead. $args = array(); if ( ! empty( $date ) ) { $args['start_date'] = $date; } } $args['eventDisplay'] = $view; if ( ! empty( $this->ical_shortcode_attributes['category'] ) ) { $args[ Tribe__Events__Main::TAXONOMY ] = $this->ical_shortcode_attributes['category']; } if ( ! empty( $this->ical_shortcode_attributes['featured'] ) ) { $args['meta_key'] = Tribe__Events__Featured_Events::FEATURED_EVENT_KEY; } return $args; }
Changelog
Version | Description |
---|---|
4.4.24 | Introduced. |