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
add_filter( 'tribe_events_event_schedule_details_formatting', 'remove_end_time', 10, 2); | |
function remove_end_time( $formatting_details ) { | |
$formatting_details['show_end_time'] = 0; | |
return $formatting_details; | |
} |
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 | |
/** | |
* Returns the contents of the event cost field without applying any | |
* formatting tricks. | |
* | |
* Useful in those cases where a non-standard cost values such as | |
* "ABC-123" is used, else they may be "mangled" by the | |
* Tribe__Events__Cost_Utils object. | |
* | |
* @param string $cost (unused) |
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_get_template_part( 'wootickets/tickets', null, array( | |
'tickets' => Tribe__Events__Tickets__Tickets::get_all_event_tickets( get_the_ID() ) | |
) ); | |
?> |
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
/* | |
* The Events Calendar - WooCommerce Tickets - Set Catalog visibility to Catalog/search for all Tickets | |
* Alternative Hooks: | |
* wootickets_after_update_ticket | |
* wootickets_after_create_ticke | |
* @version 3.12 | |
*/ | |
add_action( 'wootickets_after_save_ticket', 'tribe_events_woo_change_visibility' ); | |
function tribe_events_woo_change_visibility( $ticket_ID ) { |
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 | |
// https://gist.github.com/cliffordp/013e3e43a3f3bca9b7cc | |
add_action( 'tribe_events_single_event_before_the_meta', 'forum_1005858_ticket_header_img' ); | |
/* | |
could use different actions to output to different places on event single page | |
-- see /wp-content/plugins/the-events-calendar/src/views/single-event.php for more actions | |
-- also listed below: | |
tribe_events_single_event_before_the_content | |
tribe_events_single_event_after_the_content |
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 you use this snippet as-is, ALL of The Events Calendar (i.e. "Core") and Pro add-on styles will NOT be loaded. | |
// (although there may be some $handles that I didn't detect... especially from widgets, shortcodes, and the like... no guarantess ;-) | |
// Comment out the line of each style you DO want to load. | |
// Note the comments within each array regarding the Display style options -- https://theeventscalendar.com/knowledgebase/wp-admin-settings-overview/#display | |
// The Display styles are "stacked". | |
// In other words, the Skeleton files are always loaded, and the Full styles are loaded when Tribe Events Styles (i.e. Theme) is selected. | |
// However, the commented .css example file names can change, e.g. 'full.min.css' instead of 'skeleton.min.css' or 'theme-mobile.min.css' instead of 'full-mobile.min.css' | |
// |
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
/* | |
* The Events Calendar Get Events for 1 Year from Today in iCal Export File | |
* add coding to theme's functions.php | |
* @version 3.12 | |
* trigger export with link: http://yoursite.com/events/?ical=1&year-feed | |
* change 365 for a different range | |
*/ | |
add_action( 'pre_get_posts', 'tribe_one_year_ics_export' ); | |
function tribe_one_year_ics_export( WP_Query $query ) { | |
if ( ! isset( $_GET['ical'] ) || ! isset( $_GET['year-feed'] ) ) { |
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 | |
/** | |
* Remove the "Payment Options" link from the My List view of Community Events. | |
* | |
* This is useful to avoid confusion for end users of the site if PayPal, split | |
* payments etc are not in use. | |
*/ | |
function remove_cet_fe_payment_opts_link() { | |
if ( ! class_exists( 'Tribe__Events__Community__Tickets__Main' ) ) return; | |
$router_object = Tribe__Events__Community__Tickets__Main::instance()->routes['payment-options']; |
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 | |
/* | |
* 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 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' ) ); | |
} |
OlderNewer