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 | |
/* | |
* 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}' ); |
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 URL for the debug parameter | |
// example.com/event/event-name/?tribe_query_debug=true | |
function tribe_events_pre_get_posts_dumper ($query) { | |
$show_debug_info = isset($_GET['tribe_query_debug']) ? $_GET['tribe_query_debug'] : false; | |
if(($show_debug_info == "true" && $query->is_main_query() === true) || $show_debug_info == "full") { | |
echo "<h3><Tribe Events Query></h3>"; | |
tribe_spit_it_out($query); |
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 + Google Calendar link to each ticket in the tickets email | |
*/ | |
function tribe_add_gcal_to_email( $event ) { | |
printf( | |
'<a class="tribe-events-gcal tribe-events-button" href="%1$s" title="%2$s">%3$s</a>', | |
Tribe__Events__Main::instance()->esc_gcal_url( tribe_get_gcal_link( $event ) ), | |
esc_attr__( 'Add to Google Calendar', 'the-events-calendar' ), |
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 | |
/* | |
* 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 | |
/* | |
* Set the default date for views like List and Month | |
* Modify the $date variable below to set your date | |
*/ | |
function tribe_set_default_date( $wp_query ) { | |
// Only run on main event queries | |
if ( ! tribe_is_event_query() || ! $wp_query->is_main_query() || $wp_query->get( 'eventDate' ) != '') 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 | |
/* | |
* 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 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 | |
/* | |
* This changes the event link to the event website URL if that is set. | |
* NOTE: Comment out the add_filter() line to disable this function. | |
*/ | |
function tribe_set_link_website ( $link, $postId ) { | |
$website_url = tribe_get_event_website_url( $postId ); | |
// Only swaps link if set | |
if ( !empty( $website_url ) ) { |
NewerOlder