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
| /** | |
| * Reverse events order so newest are at the top of the list | |
| * | |
| */ | |
| function tribe_reverse_feed( $posts ) { | |
| global $wp_query; | |
| if( tribe_is_event_query() && tribe_is_upcoming() ) { | |
| $posts = array_reverse($posts); |
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
| // Changes the escerpt length for events to 100 words | |
| function custom_excerpt_length( $length ) { | |
| if( tribe_is_event() && is_archive() ) { | |
| return 100; | |
| } | |
| } | |
| add_filter( 'excerpt_length', 'custom_excerpt_length', 999 ); |
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
| // Dequeues tribe-events-ajax-list.min.js | |
| function dequeue_tribe_events_scripts() { | |
| wp_dequeue_script( 'tribe-events-list' ); | |
| } | |
| add_action('wp_enqueue_scripts', 'dequeue_tribe_events_scripts', 100 ); |
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 | |
| /** | |
| * Plugin Name: The Events Calendar: Add HTML to Excerpts | |
| * Plugin URI: http://theeventscalendar.com | |
| * Description: Ensure that allowed HTML is preserved in Events Calendar tooltips. | |
| * Version: 0.0.1 | |
| * Author: Modern Tribe | |
| * | |
| * @link http://theeventscalendar.com/?p=1038901 | |
| */ |
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_action( 'pre_get_posts', 'order_by_desc' ); | |
| function order_by_desc( $query ) { | |
| if( tribe_is_past() ) { | |
| $query->set( 'order', 'desc' ); | |
| } | |
| } |
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
| /* Hide Weekends the Events Calendar Monday First Day of Week */ | |
| .tribe-events-calendar th#tribe-events-sunday, | |
| .tribe-events-calendar th#tribe-events-saturday, | |
| .tribe-events-calendar tr td:first-child, | |
| .tribe-events-calendar tr td:last-child { | |
| display: none; | |
| } | |
| /* Hide Weekends the Events Calendar Monday First Day of Week */ |
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_action( 'pre_get_posts', 'tribe_photo_view_all_events', 15 ); | |
| function tribe_photo_view_all_events( $query ) { | |
| if ( tribe_is_photo() ) { | |
| $query->set( 'orderby', array( | |
| 'posts_per_page', -1, | |
| array( | |
| 'orderby' => 'Tribe__Events::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_filter( 'tribe_the_notices', 'customize_notice', 10, 2 ); | |
| function customize_notice( $html, $notices ) { | |
| // If text is found in notice, then replace it | |
| if( stristr( $html, 'This event has passed.' ) ) { | |
| // Customize the message as needed | |
| $html = str_replace( 'This event has passed.', 'This event is gone but will not be forgotten.', $html ); | |
| } | |
| return $html; | |
| } |
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 echo tribe_get_venue() ?> | |
| <?php if ( tribe_address_exists() ) : ?> | |
| <?php echo tribe_get_full_address(); ?> | |
| <?php if ( tribe_show_google_map_link() ) : ?> | |
| <?php echo tribe_get_map_link_html(); ?> | |
| <?php endif; ?> | |
| <?php endif; ?> |
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
| function wootickets_email_no_no() { | |
| return 'no'; | |
| } | |
| add_filter( 'wootickets-tickets-email-enabled', 'wootickets_email_no_no' ); |