This file contains 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 | |
/* | |
* Alters event's archive titles | |
*/ | |
function tribe_alter_event_archive_titles ( $original_recipe_title, $depth ) { | |
// Modify the titles here | |
// Some of these include %1$s and %2$s, these will be replaced with relevant dates | |
$title_upcoming = 'Upcoming Events'; // List View: Upcoming events |
This file contains 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 | |
/* | |
* Set a custom page template for specific pages within The Events Calendar | |
*/ | |
function tribe_theme_template_chooser ( $template ) { | |
if ( ! tribe_is_event() ) return $template; | |
/* |
This file contains 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 a link to the Facebook event pages right before the content | |
*/ | |
function tribe_link_to_fb_event() { | |
// Check if the event is associated with a Facebook event | |
$fbid = tribe_get_event_meta( get_the_ID(), '_FacebookID' ); | |
if ( empty( $fbid ) ) return; |
This file contains 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 (trims) the Event Website URL label when its too lengthy | |
*/ | |
function tribe_event_website_truncator ( $label ) { | |
// Change this to adjust when the truncator starts trimming characters | |
$max_length = 25; | |
if( strlen($label) > $max_length ) { |
This file contains 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 | |
/* | |
* Hide end time in list, map, photo, and single event view | |
* NOTE: This will only hide the end time for events that end on the same day | |
*/ | |
function tribe_remove_end_time_single( $formatting_details ) { | |
$formatting_details['show_end_time'] = 0; | |
return $formatting_details; |
This file contains 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 | |
/* | |
* Move EDD Tickets Form above Event content | |
*/ | |
if ( class_exists('Tribe__Tickets_Plus__Commerce__EDD__Main') ) { | |
remove_action( 'tribe_events_single_event_after_the_meta', array( Tribe__Tickets_Plus__Commerce__EDD__Main::get_instance(), 'front_end_tickets_form'), 5 ); | |
add_action( 'tribe_events_single_event_before_the_content', array( Tribe__Tickets_Plus__Commerce__EDD__Main::get_instance(), 'front_end_tickets_form') ); | |
} |
This file contains 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 WooCommerce Ticket product pages to stop redirecting to their event page | |
* See https://theeventscalendar.com/knowledgebase/selling-tickets-from-the-woocommerce-products-page/ | |
*/ | |
function tribe_wootix_no_hijack() { | |
if ( ! class_exists( 'Tribe__Tickets_Plus__Commerce__WooCommerce__Main' ) ) return; | |
$woo_tickets = Tribe__Tickets_Plus__Commerce__WooCommerce__Main::get_instance(); | |
remove_filter( 'post_type_link', array( $woo_tickets, 'hijack_ticket_link' ), 10, 4 ); |
This file contains 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 | |
/* | |
* Hides QR codes from the Email/Tickets sent to purchasers | |
*/ | |
function tribe_neuter_qr () { | |
if ( class_exists( 'Tribe__Tickets_Plus__Main' ) ) { | |
$qr_class = Tribe__Tickets_Plus__Main::instance()->qr(); | |
remove_action( 'tribe_tickets_ticket_email_ticket_bottom', array( $qr_class, 'inject_qr' ) ); | |
} |
This file contains 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 | |
/* | |
* This adds a fancy one-click scan QR link tie-in to the native zxing Barcode scanner app | |
* Android: https://play.google.com/store/apps/details?id=com.google.zxing.client.android&hl=en | |
* iOS: https://itunes.apple.com/us/app/barcodes-scanner/id417257150?mt=8 | |
*/ | |
function tribe_qr_scan_link_notice () { | |
if ( isset($_GET['page']) && $_GET['page'] === 'tickets-attendees' ) { | |
$qr_url = urlencode( site_url().'?event_qr_code={CODE}' ); |