This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action( 'parse_query', 'tribe_fix_tag_query' ); | |
function tribe_fix_tag_query( $query ) { | |
if ( $query->is_tag && (array) $query->get( 'post_type' ) != array( TribeEvents::POSTTYPE ) ) { | |
if ( empty( $query->query_vars['post_type'] ) ) { | |
$query->query_vars['post_type'] = array( 'post' ); | |
} | |
if ( ! ( $query->query_vars['post_type'] == array( 'post' ) || $query->query_vars == 'post' ) ) { | |
remove_action( 'parse_query', array( 'TribeEventsQuery', 'parse_query' ), 50 ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_action('wp_enqueue_scripts', 'tribe_dequeue_google_maps', 11); | |
function tribe_dequeue_google_maps() { | |
wp_dequeue_script('gmaps'); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action('admin_print_scripts', 'fix_satellite7_datepicker', 21); | |
function fix_satellite7_datepicker() { | |
global $typenow; | |
if ( class_exists('TribeEvents') && $typenow == TribeEvents::POSTTYPE ) { | |
?> | |
<script type="text/javascript"> | |
jQuery(document).ready(function($){ | |
$('.datepicker').datepicker('destroy'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action( 'pre_get_posts', 'tribe_post_date_ordering', 51 ); | |
function tribe_post_date_ordering( $query ) { | |
if ( $query->tribe_is_multi_posttype) { | |
remove_filter( 'posts_fields', array( 'TribeEventsQuery', 'multi_type_posts_fields' ) ); | |
$query->set( 'order', 'DESC' ); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action( 'template_redirect', 'tribe_fix_comments' ); | |
function tribe_fix_comments() { | |
if ( tribe_get_option( 'tribeEventsTemplate', 'default' ) == '' ) { | |
return apply_filters( 'comments_template', STYLESHEETPATH . '/comments.php' ); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action( 'init', 'tribe_fix_homepage', 11, 1 ); | |
function tribe_fix_homepage() { | |
remove_action( 'parse_request', array( 'TribeEventsQuery', 'parse_request' ), 50 ); | |
add_action( 'parse_query', 'tribe_fix_homepage_query', 51 ); | |
} | |
function tribe_fix_homepage_query( $query ) { | |
if ( ! $query->is_main_query() ) { | |
$query->is_home = false; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action( 'pre_get_posts', 'tribe_fix_title' ); | |
function tribe_fix_title( $query ) { | |
if ( $query->is_main_query() ) { | |
if ( ! $query->tribe_is_event_query ) { | |
$tec = TribeEvents::instance(); | |
remove_filter( 'wp_title', array( $tec, 'maybeAddEventTitle' ), 10, 2 ); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action('init', 'tribe_allow_large_joins'); | |
function tribe_allow_large_joins(){ | |
global $wpdb; | |
$wpdb->query('SET SQL_BIG_SELECTS=1'); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// | |
add_action('tribe_events_before_view','tribe_recurrence_schedule_meta'); | |
function tribe_recurrence_schedule_meta(){ | |
global $post; | |
// force this to run only on single event views | |
if( is_single() && tribe_is_event( $post->ID ) ){ | |
if( tribe_is_recurring_event( tribe_is_recurring_event( $post->ID ) ) ) { | |
tribe_register_meta( 'tribe_recurrence_schedule', array( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action('post_type_link', 'tribe_disable_organizer_links', 10, 2); | |
function tribe_disable_organizer_links($permalink, $post) { | |
if ($post->post_type == 'tribe_organizer') { | |
return false; | |
} | |
return $permalink; | |
} |