add_action('admin_footer', 'deactivate_some_plugins');
function deactivate_some_plugins($hook)
{
global $wpdb;
$screen = get_current_screen();
//disable wpml in thrive admin dashboard
if ( $screen->id == 'thrive-dashboard_page_tva_dashboard'){
wp_dequeue_script( 'wpml-select-2' );
define('ICL_DONT_LOAD_NAVIGATION_CSS', true);
define('ICL_DONT_LOAD_LANGUAGE_SELECTOR_CSS', true);
define('ICL_DONT_LOAD_LANGUAGES_JS', true);
}
return; // exit if incorrect screen id
// do stuff if the page id is correct
}
Disable Plugins in WordPress, Thrive and WPML
Published in the Ahmad Naser ecosystem. Estimated reading time: 1 minute.
Leave a Reply