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 | |
/** | |
* Takes care of modifying the "all" keyword used in the all-recurring-events | |
* view to something else. | |
*/ | |
class Events_Custom_All_Link { | |
protected $keyword = ''; | |
public function __construct( $keyword = 'each' ) { | |
$this->keyword = sanitize_key( $keyword ); |
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, prevent woo tickets email to be sent */ | |
add_filter( 'wootickets-tickets-email-enabled', '__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 | |
/* Adds City below event date in photo view | |
* Paste it in your child theme's functions.php file | |
*/ | |
function add_venue_to_photo_view() { | |
/* If we have city, then show city */ | |
if ( tribe_get_city() ) { | |
$venue = tribe_get_city(); | |
} | |
echo $venue; |
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 | |
/** | |
* Make WooCommerce cart Quantity input field non-editable (readonly) ONLY FOR Event Tickets Plus products | |
* | |
* By Matt B and Cliff P | |
* | |
* From https://gist.github.com/cliffordp/66bf05df61ee269c60ff20d6f39e2cab | |
*/ | |
function cliff_etplus_woo_cart_quantity_readonly() { |
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: [tribe_venues_map] shortcode | |
* Preview: https://cl.ly/3Z1e000U3L0U | |
* | |
* By Nico and Cliff 2016-08-05 | |
* From https://gist.github.com/cliffordp/8ecb7022d92f9c989e2e72ecdcf25c60 | |
*/ | |
function tribe_venues_map_logic ( $atts ){ |
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 | |
/** | |
* Event Submission Form Ticket Block | |
* Renders the ticket settings in the submission form. | |
* | |
* Override this template in your own theme by creating a file at | |
* [your-theme]/tribe-events/community-tickets/modules/tickets.php | |
* | |
* @version 4.1 | |
* @package Tribe__Events__Community__Tickets__Main |
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 | |
/** | |
* Do not load https://optimizerwp.com/optimizer-pro/ theme's Google Maps script on The Events Calendar (TEC) pages, except for Post Tags, then do not load TEC's | |
* | |
* From https://gist.github.com/cliffordp/ca3baf77c9be8b72f37db10c7c91783b | |
* | |
* For https://theeventscalendar.com/support/forums/topic/errors-you-have-included-the-google-maps-api-multiple-times-on-this-page/ | |
*/ | |
function tec_1163154_dequeue_gmaps_script() { |
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, force event, venue & organizer websites to open in a new window */ | |
add_filter( 'tribe_get_event_website_link_target', function () { return '_blank'; } ); | |
add_filter( 'tribe_get_venue_website_link_target', function () { return '_blank'; } ); | |
add_filter( 'tribe_get_organizer_website_link_target', function () { return '_blank'; } ); |
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_action( 'pre_get_posts', 'tribe_post_alphabetical_ordering', 51 ); | |
function tribe_post_alphabetical_ordering( $query ) { | |
if( tribe_is_upcoming() ) { | |
$query->set( 'orderby', 'title' ); | |
$query->set( 'order', 'ASC' ); | |
} |
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 | |
/** | |
* BCC site admin email on all Event Tickets' RSVP ticket emails so they get a copy of it too | |
* | |
* From https://gist.github.com/cliffordp/4f06f95dbff364242cf54a3b5271b182 | |
* | |
* Reference: https://developer.wordpress.org/reference/functions/wp_mail/#using-headers-to-set-from-cc-and-bcc-parameters | |
* | |
*/ | |
function cliff_et_rsvp_bcc_admin_ticket() { |