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 Get Events for 1 Year from Today in iCal Export File | |
| * add coding to theme's functions.php | |
| * To trigger the export go to this URL: http://yoursite.com/events/?ical=1&year-feed | |
| * You can change 365 (days) to export more or less events | |
| */ | |
| function tribe_one_year_ics_export( $query ) { | |
| if ( ! isset( $_GET['ical'] ) || ! isset( $_GET['year-feed'] ) ) { |
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 | |
| /* | |
| * Swaps the canonical URL for the /all/ page on recurring events | |
| */ | |
| function tribe_recurring_canonical_adjuster() { | |
| if ( ! tribe_is_recurring_event() ) return; | |
| remove_action( 'wp_head', 'rel_canonical' ); | |
| add_action( 'wp_head', 'tribe_rel_canonical' ); |
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 | |
| /* | |
| * Truncates event titles in Month (Grid) view | |
| */ | |
| function tribe_month_event_title_truncator( $title, $id = null ) { | |
| $is_month_ajax = ( defined( 'DOING_AJAX' ) && DOING_AJAX && tribe_is_month() ); | |
| $is_month_main = ( is_main_query() && tribe_is_month() ); |
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 | |
| /* | |
| * Change the default start/end time for new events. | |
| * EXAMPLE USAGE: new Tribe_Events_Change_Default_Times( '9:30am', '1pm' ); | |
| */ | |
| class Tribe_Events_Change_Default_Times | |
| { | |
| protected $start_time = 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 | |
| /* | |
| * The Events Calendar Community Events redirect to custom login form | |
| */ | |
| function tribe_ce_redirect_login () { | |
| wp_safe_redirect( site_url( '/login/' ) ); | |
| exit; | |
| } | |
| add_action ( 'tribe_ce_event_submission_login_form', 'tribe_ce_redirect_login' ); |
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 Event start date to ticket order titles in email order and checkout screens | |
| * NOTE: For recurring events the start date is always the first event in the series | |
| * not the start_date of the recurrence the user was viewing when placing their order | |
| * | |
| * @param string $title Title of the product, for tickets this is the ticket name | |
| * @param array $item The product details as generated by Woo | |
| */ |
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 | |
| /* | |
| * Remove placeholder HTML attribute from Tribe Bar elements | |
| */ | |
| function tribe_bar_remove_placeholder( $filters ) { | |
| foreach ( $filters as $fkey => $fval ) { | |
| $filters[$fkey]['html'] = preg_replace('/placeholder="[^"]*"/', '', $filters[$fkey]['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 | |
| /** | |
| * List attendees on the single events page (WooCommerce-based orders | |
| * in this example). | |
| * | |
| * This is just a quick hack/possible starting point - be nice to add a | |
| * helper/template tag within Event Tickets to get the attendee list or | |
| * change the public visibility of Tribe__Tickets__Tickets::get_attendees() | |
| * to make it easier for folks to roll their own. |
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 | |
| /* | |
| * Moves the front-end ticket purchase/RSVP form, accepts WP action/hook and optional hook priority | |
| * | |
| * @param $ticket_location_action WP Action/hook to display the ticket form at | |
| * @param $ticket_location_priority Priority for the WP Action | |
| */ | |
| function tribe_et_move_tickets_purchase_form ( $ticket_location_action, $ticket_location_priority = 10 ) { | |
| if ( ! class_exists( 'Tribe__Tickets__Tickets') ) 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 Next/Prev pages from being loaded via Ajax in List and Month views | |
| */ | |
| function tribe_prevent_ajax_paging() { | |
| echo " | |
| <script> | |
| jQuery(document).ready(function(){ |