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 | |
add_filter( 'tribe_get_event_website_link_label', 'tribe_get_event_website_link_label_default' ); | |
function tribe_get_event_website_link_label_default( $label ) { | |
if ( $label === tribe_get_event_website_url() ) { | |
$label = "Visit Website »"; | |
} | |
return '<a href="' . tribe_get_event_website_url() . '" target="_blank">' . $label . '</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 | |
/* | |
* Causes WooCommerce Ticket product pages to stop redirecting to their event page | |
* See https://theeventscalendar.com/knowledgebase/selling-tickets-from-the-woocommerce-products-page/ | |
*/ | |
function tribe_wootix_no_hijack() { | |
if ( ! class_exists( 'Tribe__Tickets_Plus__Commerce__WooCommerce__Main' ) ) return; | |
$woo_tickets = Tribe__Tickets_Plus__Commerce__WooCommerce__Main::get_instance(); | |
remove_filter( 'post_type_link', array( $woo_tickets, 'hijack_ticket_link' ), 10, 4 ); |
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 | |
/* | |
* 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 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
/** | |
Plugin Name: WooCommerce Tickets: Disable Ticket Emails | |
Description: Turns off ticket emails that are automatically sent from WooCommerce Tickets | |
Version: 1.0 | |
**/ | |
function wootickets_email_no_no() { | |
return 'no'; | |
} |
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 | |
// 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 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
woocommerce_quantity_input( array( | |
'input_name' => 'quantity_' . $ticket->ID, | |
'input_value' => 0, | |
'min_value' => 0, | |
'max_value' => $max_quantity, | |
) ); |
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 | |
/** | |
* Example for adding event data to WooCommerce checkout for Events Calendar tickets. | |
* @link http://theeventscalendar.com/support/forums/topic/event-title-and-date-in-cart/ | |
*/ | |
add_filter( 'woocommerce_cart_item_name', 'woocommerce_cart_item_name_event_title', 10, 3 ); | |
function woocommerce_cart_item_name_event_title( $title, $values, $cart_item_key ) { | |
$ticket_meta = get_post_meta( $values['product_id'] ); | |
$event_id = absint( $ticket_meta['_tribe_wooticket_for_event'][0] ); |
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
add_filter('widget_display_callback', 'increase_event_widget_limit', 10, 2); | |
/** | |
* Test if the current widget is an Advanced List Widget and fix the event limit if it is. | |
*/ | |
function increase_event_widget_limit(array $instance, $widget) { | |
if (is_a($widget, 'Tribe__Events__Pro__Advanced_List_Widget')) | |
$instance['limit'] = 30; | |
return $instance; |
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
remove_action( 'tribe_events_single_event_after_the_meta', array( TribeEDDTickets::get_instance(), 'front_end_tickets_form'), 5 ); | |
add_action( 'tribe_events_single_event_before_the_content', array( TribeEDDTickets::get_instance(), 'front_end_tickets_form') ); |
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 | |
/* | |
* 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 |
NewerOlder