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 | |
/* | |
* EXAMPLE OF CHANGING ANY TEXT (STRING) IN THE EVENTS CALENDAR | |
* See the codex to learn more about WP text domains: | |
* http://codex.wordpress.org/Translating_WordPress#Localization_Technology | |
* Example Tribe domains: 'tribe-events-calendar', 'tribe-events-calendar-pro'... | |
*/ | |
function tribe_custom_theme_text ( $translations, $text, $domain ) { | |
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 | |
// Prepends category name(s) to the event titles | |
function tribe_events_title_include_cat ($title, $id) { | |
$separator = ' » '; // HTML Separator between categories and title | |
$cats = get_the_terms($id, 'tribe_events_cat'); | |
$is_ajax = defined('DOING_AJAX') && DOING_AJAX; | |
$is_truly_admin = is_admin() && !$is_ajax; |
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 | |
/* | |
* 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 | |
/* | |
* 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 | |
/* | |
* 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 | |
/* | |
* 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 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. |