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 | |
/** | |
* Removes ticket providers except those specified in $enabled_providers | |
*/ | |
function tribe_filter_ticket_providers() { | |
// This contains the list of provider we will allow | |
$enabled_providers = array( | |
'Tribe__Tickets__RSVP', | |
); |
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 | |
/** | |
* An example for overriding the QR code look for Event Tickets Plus 4.4 | |
*/ | |
class Tribe_Custom_QR_Example { | |
public function replace_existing() { | |
remove_action( 'tribe_tickets_ticket_email_ticket_bottom', array( Tribe__Tickets_Plus__Main::instance()->qr(), 'inject_qr' ) ); | |
add_action( 'tribe_tickets_ticket_email_ticket_bottom', array( $this, 'inject_qr' ) ); |
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 | |
/** | |
* Removes the iCal and Google cal links from the single event page | |
*/ | |
function tribe_remove_single_calendar_links() { | |
if ( function_exists( 'tribe' ) ) { | |
remove_action( 'tribe_events_single_event_after_the_content', array( tribe( 'tec.iCal' ), 'single_event_links' ) ); | |
} | |
} |
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 | |
/** | |
* Remove the Tribe Customier css <script> | |
*/ | |
function tribe_remove_customizer_css(){ | |
if ( class_exists( 'Tribe__Customizer' ) ) { | |
remove_action( 'wp_print_footer_scripts', array( Tribe__Customizer::instance(), 'print_css_template' ), 15 ); | |
} | |
} |
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 | |
/** | |
* Removes link to a recurring event's RSS feed from the <head> | |
*/ | |
function tribe_remove_recurring_feed() { | |
if ( tribe_is_recurring_event() ) { | |
remove_action( 'wp_head', 'feed_links_extra', 3 ); | |
} | |
} |
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 | |
if ( ! function_exists( 'tribe_remove_anonymous_hook' ) ) { | |
/** | |
* Removes a filter or action added by anonymous objects | |
* | |
* Use this when you can not get the instance of a class attached to a hook. | |
* If the given method is attached multiple times to the hook, only one is removed. | |
* | |
* Example: tribe_remove_anonymous_hook( 'plugins_loaded', 'Tribe__Class', 'method_name' ); |
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 | |
/** | |
* Remove Tickets row actions from Admin WP tables, except for post_types selected in Settings > Tickets | |
*/ | |
function tribe_remove_row_actions() { | |
if ( ! function_exists( 'tribe_get_option' ) ) { | |
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 | |
/** | |
* Sends an email Tribe style | |
* | |
* This will retrieve a template file and use it to populate the content body. | |
* Defaults to HTML emails. | |
* | |
* @param string $email_name Name of this email in snake_case format, used as suffix in apply_filter(). | |
* @param string|array $to Array or comma-separated list of email addresses to send message. | |
* @param string $subject Email subject. |
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 removing tribe-jquery-ui-theme from being registered | |
* | |
* @see https://theeventscalendar.com/extensions/dequeue-assets/ | |
*/ | |
function tribe_remove_assets() { | |
Tribe__Assets::instance()->remove( 'tribe-jquery-ui-theme' ); | |
} |
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 | |
if ( ! function_exists( 'tribe_call_private_method' ) ) { | |
/** | |
* Calls a private/protected method in any class | |
* | |
* Only use this as a last resort. Private methods are not intended to | |
* be accessed, and can change functionality on any update. | |
* | |
* To call Tribe__Class::instance()->set_something( $var1, $var2 ) do this: |