Skip to content

Instantly share code, notes, and snippets.

@tamarazuk
Last active December 25, 2015 15:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tamarazuk/4bfcbe52010e9ef443c2 to your computer and use it in GitHub Desktop.
Save tamarazuk/4bfcbe52010e9ef443c2 to your computer and use it in GitHub Desktop.
Events Calendar Filter Requests
<?php
// Changes to the-events-calendar.class.php
// In list_ajax_call() added
$args = apply_filters('tribe_events_ajax_query_args', $args); //general
$args = apply_filters('tribe_events_ajax_list_query_args', $args); //specific
// right above
$query = TribeEventsQuery::getEvents( $args, true );
// In calendar_ajax_call() added
$query_args = apply_filters('tribe_events_ajax_query_args', $query_args); //general
$query_args = apply_filters('tribe_events_ajax_calendar_query_args', $query_args); //specific
// right above
query_posts( $query_args );
// Changes to events-calendar-pro.php
// In wp_ajax_tribe_photo() added
$args = apply_filters('tribe_events_ajax_query_args', $args); //general
$args = apply_filters('tribe_events_ajax_photo_query_args', $args); //specific
// right above
$query = TribeEventsQuery::getEvents( $args, true );
// In wp_ajax_tribe_week() added
$args = apply_filters('tribe_events_ajax_query_args', $args); //general
$args = apply_filters('tribe_events_ajax_week_query_args', $args); //specific
// right above
$query = TribeEventsQuery::getEvents( $args, true );
// In wp_ajax_tribe_event_day() added
$args = apply_filters('tribe_events_ajax_query_args', $args); //general
$args = apply_filters('tribe_events_ajax_day_query_args', $args); //specific
// right above
$query = TribeEventsQuery::getEvents( $args, true );
// Changes to tribe-geoloc.class.php
// In ajax_tribe_geosearch() added
$defaults = apply_filters('tribe_events_ajax_query_args', $defaults); //general
$defaults = apply_filters('tribe_events_ajax_map_query_args', $defaults); //specific
// right above
$query = TribeEventsQuery::getEvents( $defaults, true );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment