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 | |
function modify_woo_ticket_headers( $header, $id, $object ) { | |
remove_filter( 'woocommerce_email_headers', 'modify_woo_ticket_headers' ); | |
$organizer_email = tribe_get_organizer_email( $id, false ); | |
// add organizer email if it's a valid email address | |
if ( is_email( $organizer_email ) ) { | |
$header .= "Cc: " . $organizer_email . "\r\n"; | |
} |
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 | |
/** | |
* Link to Tickets | |
* Included on the Events Single Page after the meta | |
* the Message that Will link to the Tickets Page | |
* | |
* Override this template in your own theme by creating a file at [your-theme]/tribe-events/tickets/orders-link.php | |
* | |
* @package TribeEventsCalendar | |
* @version 4.2 |
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 | |
/* Tribe - custom JS to pre-select event categories in the new event page */ | |
function tribe_preselect_cat() { | |
?> | |
<script> | |
jQuery(document).ready( function( ) { | |
if ( jQuery('.post-new-php.post-type-tribe_events').length ) { | |
jQuery('#in-tribe_events_cat-7').attr('checked', 'checked'); |
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
/* Show additional fields meta key */ | |
function tribe_show_key_fields ( ) { | |
$fields = tribe_get_custom_fields(); | |
$fields = get_post_meta( get_the_ID() ); | |
foreach ( $fields as $name => $value ) { | |
if ( strrpos ( $name ,'_ecp_custom_' ) !== false ) { | |
echo 'Field: ' . $name . ' = ' . $value[0] . ' <br/>'; |
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 translations in Event Tickets | |
*/ | |
function tribe_custom_theme_text ( $translations, $text, $domain ) { | |
$custom_text = array( | |
'Send RSVP confirmation to:' => 'Enviar RSVP a:', |
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 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_etp_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 | |
/* | |
* The Events Calendar - Modify json+ld data before it gets printed | |
*/ | |
add_filter( 'tribe_google_data_markup_json', 'tribe_fix_google_data', 100, 1 ); | |
function tribe_fix_google_data ( $data ) { | |
$data = str_replace('</br>' ,'', $data); // replaces </br> | |
$data = str_replace('<br/>' ,'', $data); // replaces <br/> |
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
/* | |
* The Events Calendar - Limit the upcoming widget to just event running today | |
*/ | |
add_filter( 'tribe_events_list_widget_query_args', 'tribe_modify_list_widget_args', 10, 1 ); | |
function tribe_modify_list_widget_args ( $args ) { | |
$start_date_init = date ( 'Y-m-d' ); | |
$start_date_end = $start_date_init . ' 23:59:59'; |
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 | |
$is_there_any_product = false; | |
$is_there_any_product_to_sell = false; | |
ob_start(); | |
?> | |
<form action="" class="cart" method="post" enctype='multipart/form-data'> | |
<h2 class="tribe-events-tickets-title"><?php esc_html_e( 'RSVP', 'event-tickets' ) ?></h2> | |
<?php |
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 | |
/** | |
* Ensure that allowed HTML is preserved in Events Calendar tooltips. | |
* | |
* @link http://theeventscalendar.com/?p=1038901 | |
*/ | |
add_filter( 'wp_trim_words', 'tribe_support_1038901', 10, 4 ); | |
function tribe_support_1038901( $text, $num_words, $more, $original_text ) { |
NewerOlder