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 | |
# Prohibit caching of geoloc center point/bounds | |
add_filter( 'pre_transient_geoloc_center_point_estimation', '__return_null' ); | |
# Override the min/max coords | |
add_filter( 'tribe_geoloc_pre_get_min_max_coords', function() { | |
return [ | |
'min_lat' => 30, | |
'max_lat' => 40, | |
'min_lng' => 20, |
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 | |
/** | |
* Modifies the month view tooltip for multiday events. | |
* | |
* Instead of seeing "5 - 15 August", the tooltip for multiday event will show | |
* the date of the cell which contains it. | |
* | |
* For example, if a visitor hovers over the multiday event name within the cell | |
* for 11 August, the tooltip will now display "11 August" etc. | |
*/ |
We can make this file beautiful and searchable if this error is corrected: It looks like row 4 should actually have 23 columns, instead of 16 in line 3.
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
Date,Time,End date,Artist,Artist URL,Venue,Address,City,State,Postal code,Country,Venue phone,Venue URL,Admittance,Price,Ticket URL,Ticket phone,External URL,Notes,Tour,Status,Related ID,Related URL | |
2018-10-02,12:00:00,2018-10-05,Jon Bon Jovi,https://www.bonjovi.com/,Party Spot NW,1041 SW Marine Dr,Vancouver,BC,V6P 6L6,CA,,,Not sure,,,,,,,active,0, | |
2018-08-25,14:00:00,,The Spice Girls,http://thespicegirls.com/,Lakeway Dance Hall,714 Lakeway Dr,Bellingham,WA,98229,US,456-789-0123,http://lakeway.site.web,All Ages/Licensed,"¥2,225.00",,01222 333444,,"A rare treat with beef ribs jowl officia corned beef ad. Sed in culpa dolore irure corned beef shoulder nostrud cupidatat swine. | |
Dolore ullamco minim short loin short ribs cillum. Beef ham short loin strip steak in. Laboris biltong do filet mignon veniam drumstick.",,active,0, | |
2018-07-17,07:30:00,,Anna Carina,http://www.annacarina.net/,Chalkpit at Cedar City,1575 W 200 N,Cedar City,UT,84720,US,(1) 234 567 8901,,All Ages/Licensed,$25,http://some.tickets/getem/j |
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 | |
// This code can be added to a theme's functions.php file to remove | |
// the frontend ticket form (RSVPs only) | |
if ( function_exists( 'tribe' ) && class_exists( 'Tribe__Tickets__RSVP' ) ) { | |
// Remove the RSVP ticket form from blog posts, etc | |
remove_filter( 'the_content', array( | |
tribe( 'tickets.rsvp' ), 'front_end_tickets_form_in_content' | |
), 11 ); | |
// Remove the RSVP ticket form from single event posts |
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 a search is conducted in month view but the relevant events | |
* are in a different month, switch to that month. | |
* | |
* Experimental! Especially during live ajax navigation, there are | |
* parts of this that don't work cleanly (pushstate/URL changes). | |
* Unsupported, use at own risk. | |
*/ | |
class Transmogrified_Month_View_Search { |
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 events_post_date_column( $column_id, $post_id ) { | |
echo 'post_date' === $column_id ? get_the_date( '', $post_id ) : ''; | |
} | |
function events_post_date_column_header( $headers ) { | |
$headers['post_date'] = 'Post Date'; | |
return $headers; | |
} |
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 remove_mini_cal_list_end_date( $query ) { | |
remove_action( 'tribe_events_pre_get_posts', 'remove_mini_cal_list_end_date' ); | |
$query->set( 'end_date', '' ); | |
} | |
function listen_for_mini_cal_list( $template_file ) { | |
if ( basename( dirname( $template_file ) ) . '/' . basename( $template_file ) == 'mini-calendar/list.php' ) { | |
add_action( 'tribe_events_pre_get_posts', 'remove_mini_cal_list_end_date' ); | |
} |
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 featured events from event queries, unless the query | |
* is specifically for featured events. | |
*/ | |
add_action( 'tribe_events_pre_get_posts', function( $query ) { | |
if ( tribe( 'tec.featured_events' )->is_featured_query( $query ) ) { | |
return; | |
} |
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 | |
/** | |
* Unset the cheque payment option if any of the existing cart items happen to | |
* be a ticket for an event which belongs to a specific category. | |
* | |
* @param array $available_gateways | |
* | |
* @return array | |
*/ | |
function maybe_unset_gateway_by_category( $available_gateways ) { |
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 some JS to enforce a limit on the length of the submitted title. | |
* | |
* Modify the limit value (`var limit = 65`) according to your needs, etc. | |
* Remember that this is frontend only, nothing is enforced server side. | |
* | |
* Tested with Community Events 4.5.9. | |
*/ | |
add_action( 'tribe_events_community_form', function() { |