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 | |
/** | |
* Tries to force the minicalendar widget to show the month of the next upcoming event by default, rather | |
* than simply showing the current month (which might be empty). | |
*/ | |
class Tribe_Advance_Minical | |
{ | |
protected $target_date = 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_filter('tribe_get_events_title', 'change_upcoming_events_title'); | |
function change_upcoming_events_title($title) { | |
//We'll change the title on upcoming and map views | |
if (tribe_is_upcoming() or tribe_is_map() or tribe_is_photo()) return 'Upcoming Parties'; | |
//In all other circumstances, leave the original title in place | |
return $title; |
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 | |
// Overrides every request for viewOption from TribeEvents::getOption() | |
function tribe_swap_default_category_view ($option, $default, $optionName) { | |
// For a list of acceptable views/values run print_r(tribe_events_enabled_views()); | |
$default_events_view = 'month'; // The default view for the main page, venue, etc. | |
$default_category_view = 'list'; // The default view for any calendar category |
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 | |
// Changes all events to display as all day events | |
function tribe_all_events_all_day ($output) { | |
if ( !is_admin() && tribe_is_event() ) { | |
$output = true; | |
} | |
return $output; |
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 | |
// Selectively hide events from specific user roles | |
function tribe_event_category_permissions ($wp_query) { | |
// Include all posts on admin views | |
if ( is_admin() ) return $wp_query; | |
$exclude_cats = 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 | |
// Allows "SQL_BIG_SELECTS", improving database performance on some MySQL configurations | |
function tribe_allow_large_joins(){ | |
global $wpdb; | |
$wpdb->query('SET SQL_BIG_SELECTS=1'); | |
} | |
add_action('init', 'tribe_allow_large_joins'); |
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 | |
// Adds upcoming menu item to WP Admin Menu | |
function tribe_custom_admin_menu () { | |
add_submenu_page( | |
'/edit.php?post_type='.TribeEvents::POSTTYPE, | |
'Events: Upcoming', | |
'Events: Upcoming', | |
apply_filters( 'tribe_settings_req_cap', 'manage_options' ), | |
'edit.php?post_type='.TribeEvents::POSTTYPE.'&orderby=start-date&order=asc&upcoming-events=true' |
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 | |
// Fixes bug in TEC 3.8 | |
// Edits of events will now update the month view browsable date range | |
function tribe_listen_for_event_updates() { | |
if ( class_exists( 'TribeEvents' ) ) | |
add_action( 'save_post_' . TribeEvents::POSTTYPE, 'tribe_force_update_event_date_range' ); | |
} | |
add_action( 'init', 'tribe_listen_for_event_updates' ); |
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_filter( 'tribe_get_option', 'tribe_adjust_embedded_map_height', 10, 2 ); | |
function tribe_adjust_embedded_map_height( $value, $property ) { | |
if ( 'embedGoogleMapsHeight' !== $property ) return $value; | |
return '350px'; |
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 | |
/* | |
* Set's Tec's preferred area for search results from the Location search in Tribe Bar | |
*/ | |
function tribe_set_geo_lookup_bounds ($localizations) { | |
// SW corner of your bounds rectangle | |
$localizations['geocenter']['max_lat'] = '49'; | |
$localizations['geocenter']['max_lng'] = '-8'; |
OlderNewer