Skip to content

Instantly share code, notes, and snippets.

@joshuafredrickson
Last active July 19, 2022 21:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joshuafredrickson/bfac0d08c5d3366326d7b8ab75d8471c to your computer and use it in GitHub Desktop.
Save joshuafredrickson/bfac0d08c5d3366326d7b8ab75d8471c to your computer and use it in GitHub Desktop.
WordPress mu-plugin: Fixes a conflict between ACF and TEC date picker fields
<?php
/**
* Plugin Name: Dequeue Tribe Events on certain pages
* Plugin URI: https://support.advancedcustomfields.com/forums/topic/conflict-with-tribe-events-calendar-date-picker-and-time-picker/
* Version: 1.0.0
* Description: Fixes a conflict between ACF and TEC date picker fields
* Author: Joshua Fredrickson
* Author URI: https://github.com/joshuafredrickson
* License: GNU General Public License v2
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
*/
add_action('wp_print_scripts', function () {
if (strpos($_SERVER['REQUEST_URI'], '/* Portion of URL to match */')) {
wp_dequeue_script('tribe-common');
wp_dequeue_script('tribe-admin-url-fragment-scroll');
wp_dequeue_script('tribe-buttonset');
wp_dequeue_script('tribe-validation');
wp_dequeue_script('tribe-dependency');
wp_dequeue_script('tribe-pue-notices');
wp_dequeue_script('tribe-migrate-legacy-settings');
wp_dequeue_script('tribe-events-admin');
wp_dequeue_script('tribe-events-ecp-plugins');
wp_dequeue_script('tribe-events-editor');
wp_dequeue_script('tribe-events-dynamic');
wp_dequeue_script('tribe-ignored-events');
wp_dequeue_script('tribe-ea-fields');
wp_dequeue_script('tribe-tooltip-js');
wp_dequeue_script('tribe-onboarding-js');
wp_dequeue_script('tribe-common-logging-controls');
wp_dequeue_script('tribe-app-shop-js');
wp_dequeue_script('tribe-events-pro-handlebars');
wp_dequeue_script('tribe-events-settings');
wp_dequeue_script('tribe-notice-dismiss');
wp_dequeue_script('tribe-events-pro-admin-manager');
wp_dequeue_script('tribe-admin-help-page');
}
}, 100);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment