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 a list of upcoming organizers, behaves like get_posts() | |
| * | |
| * @return array Containing the WP_Post for each organizer | |
| */ | |
| function tribe_get_upcoming_organizers() { | |
| $organizers = get_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 | |
| /* | |
| * Changes event website link to one that opens in a new window/tab | |
| */ | |
| function tribe_get_event_website_link_target_blank( $target ) { | |
| return '_blank'; | |
| } | |
| add_filter( 'tribe_get_event_website_link_target', 'tribe_get_event_website_link_target_blank' ); |
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 | |
| /* | |
| * When an RSVP is submitted succesfully redirect users to a new page | |
| */ | |
| function tribe_event_tickets_rsvp_success_script() { | |
| if( ! isset($_GET['rsvp_sent']) || $_GET['rsvp_sent'] != 1 ) return; | |
| // Change this to URL that you want users redirected to |
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 Time of Day filter that allows selecting by specific hour ranges in the afternoon | |
| * New filter available in WP-Admin > Events > Settings > Filters | |
| */ | |
| if ( class_exists( 'Tribe__Events__Filterbar__Filter' ) ) { | |
| class Tribe__Events__Filterbar__Filters__Time_Of_Day_Custom extends Tribe__Events__Filterbar__Filter { | |
| public $type = 'checkbox'; |
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 | |
| /* | |
| * Shortcode that extends the existing countdown shortcode, but this ones shows | |
| * the next upcoming events rather than a specific one. | |
| * | |
| * Example usage: | |
| * | |
| * [tribe_event_countdown_next show_seconds="1" complete="The party is on!"] | |
| */ |
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 | |
| /* | |
| * In month view the month with the first upcoming event is shown | |
| */ | |
| function tribe_fast_forward_month_view( $query ) { | |
| // Dont interfere with other month views (like mini-cal) | |
| if ( ! $query->is_main_query() ) return; | |
| // Dont interfere outside of month view | |
| if ( ! tribe_is_month() ) return; |
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 | |
| /* | |
| * Prevents users from adding tickets to cart unless they have selected at least one ticket | |
| */ | |
| function tribe_prevent_add_cart_empty() { | |
| echo ' | |
| <script type="text/javascript"> | |
| jQuery( document ).ready(function(){ | |
| jQuery( "form.cart" ).each(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 | |
| /* | |
| * Checks the front-end box "Show only the first upcoming instance of recurring events" by default | |
| */ | |
| function tribe_subsequent_recurrence_default( $option, $name, $default ) { | |
| if ( $name === 'hideSubsequentRecurrencesDefault' && ! is_admin() ) $option = true; | |
| return $option; |
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
| /* | |
| With events that were imported via iCal, when deleted the calendar still | |
| remembers them a bit so they don't get reimported. This SQL Query will truly | |
| delete all those events. | |
| The query and steps below is modified version of that in this tutorial: | |
| http://wpguru.co.uk/2013/02/how-to-bulk-delete-posts-in-wordpress-with-mysql/ | |
| It is recommended that you read the source article above before proceeding. | |
| In particular it mentioned the importance of making backups before running | |
| SQL queries. :) |
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
| /* | |
| This SQL Query will delete all recurrences of an event, while preserving the | |
| original event. It can delete many thousands of recurrences per second on most | |
| servers. | |
| The query and steps below is modified version of that in this tutorial: | |
| http://wpguru.co.uk/2013/02/how-to-bulk-delete-posts-in-wordpress-with-mysql/ | |
| It is recommended that you read the source article above before proceeding. | |
| Step 1) Grab the "post_parent" ID for your recurring series of events. Navigate |