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 Get Count of Future Events | |
| * | |
| * @3.8.1 | |
| */ | |
| $args = array( | |
| 'post_type' => 'tribe_events', | |
| 'meta_query' => array( | |
| array( | |
| 'key' => '_EventStartDate', |
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
| /* | |
| * Add List Widget StyleSheet for the Events Calendar | |
| * The Events Calendar @3.9 | |
| * | |
| */ | |
| add_action( 'wp_print_styles', 'tribe_list_widget_stylesheet' ); | |
| function tribe_list_widget_stylesheet() { | |
| wp_enqueue_style( 'widget-calendar-pro-style', TribeEventsPro::instance()->pluginUrl . 'resources/widget-calendar-full.css', array(), apply_filters( 'tribe_events_pro_css_version', TribeEventsPro::VERSION ) ); | |
| } |
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 - Include Genesis Simple Sharing Above Single Events Content | |
| * | |
| */ | |
| add_filter( 'tribe_events_single_event_before_the_content', 'tribe_genesis_event_share' ); | |
| function tribe_genesis_event_share( $post_info ) { | |
| if ( is_singular('tribe_events') && function_exists( 'genesis_share_get_icon_output' ) ) { | |
| global $Genesis_Simple_Share; | |
| $share = genesis_share_get_icon_output( 'entry-meta', $Genesis_Simple_Share->icons ); |
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
| /* Disable Plugin Notifications in WordPress | |
| * Tested in 4.0 | |
| * Add to your theme's function.php and replace 'plugin-directory/plugin-file.php' with the plugin to disable | |
| * | |
| */ | |
| add_filter( 'site_transient_update_plugins', 'jp_filter_plugin_updates' ); | |
| function jp_filter_plugin_updates( $value ) { | |
| unset( $value->response['plugin-directory/plugin-file.php'] ); | |
| return $value; | |
| } |
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
| /* | |
| * Add Content Below The Events Calendar Community Events Event List Login Form | |
| * The Events Calendar @3.9 | |
| * Use tribe_is_community_edit_event_page() for the Community Events Add Page | |
| */ | |
| add_action( 'tribe_events_after_view', 'tribe_community_below_list_form' ); | |
| function tribe_community_below_list_form() { | |
| if (tribe_is_community_my_events_page() && !is_user_logged_in()) { | |
| ?> |
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 check if Event Brite Event is Live | |
| * $eb_is_live returns true if live | |
| * Add an eventid (postid) if not used in the loop to isLive() | |
| */ | |
| $tribe_eventbrite = new Event_Tickets_PRO(); | |
| $eb_is_live = $tribe_eventbrite->isLive(); |
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
| /* | |
| * Translate Add to Cart in WooCommerce Tickets | |
| * @version 3.9 | |
| * | |
| */ | |
| function woocommcere_tickets_filter_translations($translations, $text, $domain) { | |
| if ($domain == 'tribe-wootickets') { | |
| $text = str_ireplace( 'Add to cart', 'Add to cart(Translate)', $text ); |
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 Calender Pro - Move Related Events Below Content | |
| * @3.9 | |
| */ | |
| if ( class_exists( 'TribeEventsPro' ) ) { | |
| $related_events = array( TribeEventsPro::instance(), 'register_related_events_view' ); | |
| remove_action('tribe_events_single_event_after_the_meta', $related_events ); | |
| add_action('tribe_events_single_event_after_the_content', $related_events ); | |
| } |
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
| /* Show End Times for Event and Current GMT Time - The Events Calendar | |
| * *3.9 | |
| * | |
| */ | |
| $gmt_offset = ( get_option( 'gmt_offset' ) >= '0' ) ? ' +' . get_option( 'gmt_offset' ) : " " . get_option( 'gmt_offset' ); | |
| $gmt_offset = str_replace( array( '.25', '.5', '.75' ), array( ':15', ':30', ':45' ), $gmt_offset ); | |
| echo "gmt offset: " . $gmt_offset . "<br>"; | |
| echo "event end time actual: " . tribe_get_end_date( $post, false, 'Y-m-d G:i' ) . "<br>"; |