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
| /* | |
| Shows how many recurrences each recurring event has. | |
| Includes events from all statuses including in the trash. | |
| */ | |
| SELECT | |
| `post_parent` as event_id, | |
| COUNT(*) As recurrences | |
| FROM | |
| wp_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
| <?php | |
| /** | |
| * Retrieves the next upcoming recurrence for a given post ID | |
| * | |
| * @param int $event_id The post ID for the event | |
| * | |
| * @return WP_Post|null The event post object, or null if nothing was found | |
| */ | |
| function tribe_get_next_upcoming_recurrence( $event_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
| <?php | |
| /** | |
| * Add CSS classes to month view multiday events | |
| * Three classes are added: tribe-month-multiday-event, tribe-month-multiday-start-date, tribe-month-multiday-end-date | |
| */ | |
| function tribe_add_ongoing_class_month_view ( $classes ) { | |
| global $post; | |
| $event_id = $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
| <?php | |
| /** | |
| * Causes calendar to always show Google Map and Link, regardless of individual event settings | |
| */ | |
| add_filter( 'tribe_embed_google_map', '__return_true' ); | |
| add_filter( 'tribe_show_google_map_link', '__return_true' ); |
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 | |
| /** | |
| * Removes time from List View | |
| */ | |
| function tribe_remove_time_list_view( $settings ) { | |
| if( ! tribe_is_upcoming() && ! tribe_is_past() ) return $settings; | |
| $settings[ 'time' ] = false; |
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 | |
| /** | |
| * Adds a link to the list view for booking an event if an RSVP or Ticket is available | |
| */ | |
| function tribe_events_output_cta() { | |
| if( ! tribe_is_list_view() ) return; | |
| $event = tribe_events_get_event( null ); |
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 | |
| /** | |
| * Removes json LD from loading on month view | |
| */ | |
| function tribe_remove_json_ld_month() { | |
| if ( tribe_is_month() ) { | |
| tribe_remove_anonymous_hook( 'wp_head', 'Tribe__Events__Template__Month', 'json_ld_markup' ); | |
| } | |
| } |
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 | |
| /** | |
| * Automatically shows all categories on Community Events: Add/Edit page | |
| */ | |
| function tribe_community_show_all_cats() { | |
| if ( ! tribe_is_community_edit_event_page() ) return; | |
| echo ' <script type="text/javascript"> | |
| jQuery( document ).ready(function(){ |
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 | |
| /** | |
| * Customized version of the Category Filter that includes CSS classes for subcategories | |
| * New filter available in WP-Admin > Events > Settings > Filters | |
| */ | |
| if ( class_exists( 'Tribe__Events__Filterbar__Filters__Category' ) ) { | |
| class Tribe__Events__Filterbar__Filters__Category_Custom extends Tribe__Events__Filterbar__Filters__Category { |
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 | |
| /* | |
| * Disable JSON LD markup used by search engines | |
| */ | |
| add_filter( 'tribe_json_ld_markup', '__return_empty_string' ); |