Skip to content

Instantly share code, notes, and snippets.

@jesseeproductions
Last active December 1, 2020 19:13
Show Gist options
  • Save jesseeproductions/9dfea57be5bc3dd3b87bca2c192b90f5 to your computer and use it in GitHub Desktop.
Save jesseeproductions/9dfea57be5bc3dd3b87bca2c192b90f5 to your computer and use it in GitHub Desktop.
Disable WP-Oauth Select 2 Script on Single Tribe Events Editor
<?php
/**
* Disable WP-Oauth Select 2 Script on Single Tribe Events Editor
*
*/
function tribe_wo_server_deregister_files() {
if ( 'tribe_events' !== get_post_type() ) {
return;
}
wp_dequeue_script( 'wo_admin_select2' );
}
add_action( 'admin_print_scripts-post-new.php', 'tribe_wo_server_deregister_files' );
add_action( 'admin_print_scripts-post.php', 'tribe_wo_server_deregister_files' );
/**
* Disable WP-Oauth Select 2 Script on Tribe Event Imports
*
*/
function tribe_imports_wo_server_deregister_files() {
wp_dequeue_script( 'wo_admin_select2' );
}
add_action( 'admin_print_scripts-tribe_events_page_aggregator', 'tribe_imports_wo_server_deregister_files' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment