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 | |
/** | |
* Unregisters the Google Maps API on Events Calendar PRO. | |
*/ | |
add_action( 'wp_print_scripts', 'ecp_remove_google_maps_api', 100 ); | |
function ecp_remove_google_maps_api() { | |
wp_deregister_script( 'tribe-gmaps' ); | |
} |
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 | |
/** | |
* Disable the Rest API for The Events Calendar | |
*/ | |
add_filter( 'tribe_events_rest_api_enabled', '__return_false' ); | |
add_action( 'init', 'disable_rest_api' ); | |
function disable_rest_api(){ | |
remove_action( 'rest_api_init', array( tribe( 'tec.rest-v1.main' ), 'register_endpoints' ) ); | |
} |
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 | |
/** | |
* Change the "There were no results found" text on TEC. | |
*/ | |
add_filter( 'tribe_the_notices', 'change_notice', 10, 2 ); | |
function change_notice( $html ) { | |
if ( stristr( $html, 'There were no results found.' ) ) { | |
//Replace 'Your custom message' with the text you want. | |
$html = str_replace( 'There were no results found.', 'Your custom message', $html ); |
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
/* Use this SQL Query to permanently delete all events before a specific Event End Date. | |
Author: Patricia Hillebrandt | |
Date: 02/14/2018 | |
*/ | |
DELETE t1 | |
FROM wp_posts AS t1 | |
INNER JOIN wp_postmeta AS t2 | |
ON t1.ID = t2.post_id | |
WHERE t1.post_type = 'tribe_events' | |
AND t2.meta_key = '_EventEndDate' |
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
/* Use this SQL Query to move all events before a specific Event End Date to trash. | |
Author: Patricia Hillebrandt | |
Date: 02/14/2018 | |
*/ | |
UPDATE wp_posts AS t1 | |
INNER JOIN wp_postmeta AS t2 | |
ON t1.ID = t2.post_id | |
SET t1.post_status = 'trash' | |
WHERE t1.post_type = 'tribe_events' | |
AND t2.meta_key = '_EventEndDate' |
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 Snippet allows you to modify the keyword search in the tribe events bar | |
* Author: Patricia Hillebrandt | |
* Date: 14/12/17 | |
*/ | |
add_filter( 'tribe-events-bar-filters', 'custom_setup_keyword_search_in_bar', 10 ); | |
function custom_setup_keyword_search_in_bar( $filters ) { |
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 Snippet allows you to modify/translate the Buy Now button and "tickets left" texts | |
* Author: Patricia Hillebrandt | |
* Date: 13/12/17 | |
*/ | |
add_filter( 'tribe_tickets_buy_button', 'translate_button_text', 11, 2 ); | |
function translate_button_text( $html ) { |
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 template overrides the default List View Loop (in the-events-calendar/src/views/loop.php) and groups events by day of the week. | |
* Author: Patricia Hillebrandt | |
* | |
* Add this file to [your-theme]/tribe-events/list/ | |
* Example: https://theeventscalendar.com/content/uploads/2017/11/Screenshot-from-2017-11-28-15-00-05.png | |
* Required plugins: The Events Calendar | |
* Date: 11-28-2017 | |
* |
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 | |
/** | |
* Removes Select2 library from The Events Calendar | |
* By: Patricia Hillebrandt | |
* Date: 11/22/17 | |
*/ | |
add_action( 'wp_print_scripts', 'tribe_disable_select2', 20 ); | |
add_action( 'admin_enqueue_scripts', 'tribe_disable_select2', 20 ); | |
function tribe_disable_select2() { |
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 | |
/** | |
* Dequeue tribe-events-ajax-maps.js file. | |
* Author: Patricia Hillebrandt | |
* Date: 11/21/17 | |
*/ | |
add_action( 'wp_print_scripts', 'dequeue_map_script', 100 ); | |
function dequeue_map_script() { | |
wp_dequeue_script( 'tribe-events-pro-geoloc' ); | |
wp_deregister_script( 'tribe-events-pro-geoloc' ); |
NewerOlder