This file contains hidden or 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
| /* | |
| * The Events Calendar - Load Tribe Bar Script on Single Events | |
| * @version 3.11.1 | |
| */ | |
| add_action( 'template_redirect', 'tribe_admin_bar_script' ); | |
| function tribe_admin_bar_script() { | |
| if ( is_singular( 'tribe_events' ) ) { | |
| add_filter( 'tribe-events-bar-should-show', '__return_true' ); | |
| //wp_enqueue_script( 'tribe-events-bar' ); |
This file contains hidden or 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
| /* | |
| * The Events Calendar - Facebook Events Add Category | |
| * TEC Fcebook Events @3.11 | |
| */ | |
| add_action( 'added_post_meta', 'tribe_save_fb_event_category', 10, 4 ); | |
| function tribe_save_fb_event_category( $meta_id, $post_id, $meta_key, $meta_value ) { | |
| if ( '_EventOrigin' == $meta_key ) { | |
| if( !has_term( '', 'tribe_events_cat', $post_id ) ) { |
This file contains hidden or 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
| /* | |
| * The Events Calendar Pro - Hide Mini Calendar Event List Until Calendar Date is Clicked | |
| * TEC PRO @3.11.1 | |
| */ | |
| add_action( 'wp_footer', 'tribe_hide_mini_calendar_list_until_clicked', 50 ); | |
| function tribe_hide_mini_calendar_list_until_clicked() { | |
| ?> | |
| <script> | |
| var $ = jQuery.noConflict(); |
This file contains hidden or 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
| <code>$datetime_format = 'F j @ H:i'; | |
| $tribe_EventStartDate = tribe_get_event_meta( get_the_ID(), '_EventStartDate', true ); | |
| $date = strtotime( $tribe_EventStartDate ); | |
| echo tribe_event_format_date( $date, true, $datetime_format ); | |
| $tribe__EventEndDate = tribe_get_event_meta( get_the_ID(), '_EventEndDate', true ); | |
| $date = strtotime( $tribe__EventEndDate ); | |
| echo tribe_event_format_date( $date, true, $datetime_format );</code> |
This file contains hidden or 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
| /* | |
| * The Events Calendar - Yoast SEO - Prevent Yoast from changing Event Title Tags for Event Views (Month, List, Etc,) | |
| * @TEC - 3.11 | |
| * @Yoast - 2.3.4 | |
| */ | |
| add_action( 'pre_get_posts', 'tribe_remove_wpseo_title_rewrite', 20 ); | |
| function tribe_remove_wpseo_title_rewrite() { | |
| if ( class_exists( 'Tribe__Events__Main' ) && class_exists( 'Tribe__Events__Pro__Main' ) ) { | |
| if( tribe_is_month() || tribe_is_upcoming() || tribe_is_past() || tribe_is_day() || tribe_is_map() || tribe_is_photo() || tribe_is_week() ) { | |
| $wpseo_front = WPSEO_Frontend::get_instance(); |
This file contains hidden or 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 | |
| /* | |
| * The Events Calendar - Remove Events from Admin Bar for all roles, but the admin | |
| * @3.11 | |
| * | |
| */ | |
| add_action( 'wp_before_admin_bar_render', 'removeToolbarItems' , 10 ); | |
| function removeToolbarItems(){ | |
| global $wp_admin_bar; | |
| if(!current_user_can('manage_options')){ |
This file contains hidden or 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 | |
| /** | |
| * Returns the contents of the event cost field without applying any formatting tricks. | |
| * | |
| * Useful in those cases where a non-standard cost values such as | |
| * "ABC-123" is used, else they may be "mangled" by the | |
| * Tribe__Events__Cost_Utils object. | |
| * | |
| * @param string $cost (unused) | |
| * @param int $post_id |
This file contains hidden or 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
| /* | |
| * The Events Calendar - Remove iCal and gCal Links in Event Details of Single Events | |
| * @3.11 | |
| * | |
| */ | |
| remove_action('tribe_events_single_event_after_the_content', array('Tribe__Events__iCal', 'single_event_links')); |
This file contains hidden or 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
| /* | |
| * The Events Calendar - Remove Mini Calendar and List Widget Stylesheet | |
| * @3.10 | |
| * | |
| */ | |
| add_action('wp_print_styles', 'events_calendar_remove_styles' , 10 ); | |
| add_action('get_footer', 'events_calendar_remove_styles' , 10 ); | |
| function events_calendar_remove_styles() { | |
| wp_dequeue_style( 'widget-calendar-pro-style' ); |