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, limit ticket qty */ | |
function tribe_limit_tickets() { | |
?> | |
<script type="text/javascript"> | |
jQuery(document).ready( function( $ ) { | |
// do this if tickets available | |
if ( $('.tribe-events-tickets').length ) { | |
// set max qty to 1 |
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 | |
/** | |
* Prevent calendar export links from showing anywhere on the front-end. | |
* | |
* | |
*/ | |
class Tribe__Events__Remove__Export__Links { | |
public function __construct() { | |
add_action( 'init', array( $this, 'single_event_links' ) ); |
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_custom_theme_text ( $translation, $text, $domain ) { | |
$custom_text = array( | |
'Confirm RSVP' => 'Confirm Reservation', | |
'RSVP' => 'Reservation', | |
'Please fill in the RSVP confirmation name and email fields.' => 'Please fill in the Reservation confirmation name and email fields.', | |
'Send RSVP confirmation to:' => 'Send Reservation confirmation to:' | |
); |
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 restore_ticket_csv_headers( $columns ) { | |
// Only meddle with the attendee csv export request | |
if ( ! isset( $_GET['attendees_csv'] ) ) return $columns; | |
// Tribe__Tickets__Tickets_Handler::instance() already owns an attendee | |
// table object but it is private and there is not currently an accessor | |
$attendees_table = new Tribe__Tickets__Attendees_Table(); |
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 recurrence from new event and edit event screens */ | |
function tribe_remove_recurrence ( ) { | |
remove_action( 'tribe_events_date_display', array( 'Tribe__Events__Pro__Recurrence__Meta', 'loadRecurrenceData' ) ); | |
} | |
add_action( 'admin_init', 'tribe_remove_recurrence' ); |
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_custom_theme_text ( $translation, $text, $domain ) { | |
// Put your custom text here in a key => value pair | |
// Example: 'Text you want to change' => 'This is what it will be changed to' | |
// The text you want to change is the key, and it is case-sensitive | |
// The text you want to change it to is the value | |
// You can freely add or remove key => values, but make sure to separate them with a comma | |
// This example changes the label "Venue" to "Location", and "Related Events" to "Similar Events" | |
$custom_text = array( |
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 | |
/** | |
* Renders the attendee list for an event | |
* | |
* Override this template in your own theme by creating a file at: | |
* | |
* [your-theme]/tribe-events/attendees-list.php | |
* | |
* @version 4.3.5b | |
* |
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, allow products to be an option to add ticket to in 'Events > Tickets > Settings' */ | |
/* WARNING: this brought issues to customers in the past, so activate at your own risk */ | |
if ( class_exists('Tribe__Tickets_Plus__Commerce__WooCommerce__Main') ) { | |
remove_filter( 'tribe_tickets_settings_post_types', array( Tribe__Tickets_Plus__Commerce__WooCommerce__Main::get_instance(), 'exclude_product_post_type' ) ); | |
} |
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 | |
/* Force the use of the cost field of event and ignore tickets price */ | |
function tribe_just_show_price_field ( $cost, $post_id, $with_currency_symbol ) { | |
$cost_utils = Tribe__Events__Cost_Utils::instance(); | |
$cost = tribe_get_event_meta( $post_id, '_EventCost' ); | |
if ( $with_currency_symbol ) { | |
$cost = $cost_utils->maybe_format_with_currency( $cost ); |
NewerOlder