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 | |
/** | |
* 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 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 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 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 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 | |
/** | |
* 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 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 ) ) { |
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 | |
/** | |
* Removes the iCal and Google cal links from the single event page | |
*/ | |
function tribe_remove_single_calendar_links() { | |
if ( function_exists( 'tribe' ) ) { | |
remove_action( 'tribe_events_single_event_after_the_content', array( tribe( 'tec.iCal' ), 'single_event_links' ) ); | |
} | |
} |
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 allows you to escape characters in TEC date formats | |
* | |
* Example date format: F \d\e j, Y | |
* Example date: dezembro de 31, 2014 | |
* http://codex.wordpress.org/Formatting_Date_and_Time#Escaping | |
* | |
* You can change these formats in WP Admin > Events > Settings > Display | |
*/ |
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 | |
// Changes past event views to reverse chronological order | |
function tribe_past_reverse_chronological ($post_object) { | |
$past_ajax = (defined( 'DOING_AJAX' ) && DOING_AJAX && $_REQUEST['tribe_event_display'] === 'past') ? true : false; | |
if(tribe_is_past() || $past_ajax) { | |
$post_object = array_reverse($post_object); | |
} |
NewerOlder