Last active
December 1, 2020 19:13
-
-
Save jesseeproductions/9dfea57be5bc3dd3b87bca2c192b90f5 to your computer and use it in GitHub Desktop.
Disable WP-Oauth Select 2 Script on Single Tribe Events Editor
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 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