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 | |
function etp_woo_use_alternate_autocomplete_trigger() { | |
if ( ! class_exists( 'Tribe__Tickets_Plus__Commerce__WooCommerce__Main' ) ) { | |
return; | |
} | |
$woo_provider = Tribe__Tickets_Plus__Commerce__WooCommerce__Main::get_instance(); | |
remove_action( 'woocommerce_payment_successful_result', array( $woo_provider, 'maybe_complete_order' ) ); |
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 | |
<?php | |
/** | |
* Single Event Meta (Details) Template | |
* | |
* Override this template in your own theme by creating a file at: | |
* [your-theme]/tribe-events/modules/meta/details.php | |
* | |
* @package TribeEventsCalendar | |
*/ |
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 | |
/** | |
* Disable Ninja Forms on the The Events Calendar Attendees page. | |
* | |
* Fixes bug where Ninja Forms overrides the attendee list. | |
*/ | |
if( is_admin() && ! empty( $_GET['page'] ) && 'tickets-attendees' === $_GET['page'] ) { | |
remove_action( 'admin_init', array( Ninja_Forms::instance()->menus[ 'forms' ], 'admin_init' ) ); | |
} |
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 | |
/* | |
* The Events Calendar - Make code empty if it's 0 or Free | |
*/ | |
add_filter ( 'tribe_get_cost', 'tribe_not_show_free', 10, 3 ); | |
function tribe_not_show_free ( $cost, $post_id, $with_currency_symbol ) { | |
if ( $cost == 0 || $cost == 'Free' ) { | |
$cost = ''; |
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_filter( 'wpseo_canonical', function( $canonical_url ) { | |
global $wp_query; | |
return ! empty( $wp_query->tribe_is_event_query ) && wp_is_mobile() | |
? Tribe__Events__Main::instance()->getLink( tribe_get_mobile_default_view() ) | |
: $canonical_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 | |
/* Tribe, remove tickets form for recurring instances other than the first */ | |
function tribe_remove_tickets_from_recurring_instances ( ) { | |
global $post; | |
// bail if The Events Calendar or Event Tickets Plus are not active | |
if ( !class_exists( 'Tribe__Events__Main' ) || !class_exists('Tribe__Tickets_Plus__Commerce__WooCommerce__Main') ) return 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 | |
// Show the ticket header img | |
if ( ! isset( $ticket_header_img_rendered ) ) { | |
$img_id = Tribe__Tickets__Tickets_Handler::instance()->get_header_image_id( $ticket->get_event()->ID ); | |
$header_img = wp_get_attachment_image_src( $img_id, 'full' ); | |
if ( ! $header_img ) break; | |
echo "<img src='{$header_img[0]}' />"; | |
$ticket_header_img_rendered = true; | |
} |
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 function tribe_past_events_shortcode( $atts ) { | |
if ( ! class_exists( 'Tribe__Events__Pro__Shortcodes__Tribe_Events' ) ) return ''; | |
add_action( 'parse_query', 'tribe_past_events_shortcode_modify_query' ); | |
$shortcode = new Tribe__Events__Pro__Shortcodes__Tribe_Events( $atts ); | |
return $shortcode->output(); | |
} | |
function tribe_past_events_shortcode_modify_query( $query ) { | |
$query->set( 'tribe_is_past', true ); | |
remove_action( 'parse_query', 'tribe_past_events_shortcode_modify_query' ); |
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 | |
function tribe_snippet_clean_filename( $filename, $filename_raw ) { | |
if ( 0 === strpos( $filename, '.' ) && false === strpos( $filename_raw, '.' ) ) { | |
return substr( $filename, 1 ); | |
} | |
return $filename; | |
} | |
add_filter( 'sanitize_file_name', 'tribe_snippet_clean_filename', 10, 2 ); |
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 | |
if ( class_exists('Tribe__Tickets_Plus__Commerce__WooCommerce__Main') ) { | |
// remove default action | |
remove_filter ( 'the_content', array( Tribe__Tickets_Plus__Commerce__WooCommerce__Main::get_instance(), 'front_end_tickets_form_in_content' ), 11 ); | |
function custom_front_end_tickets_form_in_content( $content ) { | |
$woo = Tribe__Tickets_Plus__Commerce__WooCommerce__Main::get_instance(); |