Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- add_action( 'admin_enqueue_scripts', 'block_theme_spitting', 11 );
- function block_theme_spitting()
- {
- global $current_screen;
- // Correct pages, do nothing
- if(
- 'launch_page_zillaframework-themes' == $current_screen->base
- || 'launch_page_zillaframework-update' == $current_screen->base
- || 'toplevel_page_zillaframework' == $current_screen->base
- )
- return;
- // Deregister wrongfully enqueued scripts
- $deregister = array(
- 'zilla-ajaxupload',
- 'zilla-jgrowl',
- 'zilla-admin',
- 'zilla-framework-admin',
- 'zilla-upload'
- );
- foreach( $deregister as $dreg )
- {
- if( wp_script_is( $dreg,'registered' ) ) {
- wp_dequeue_script($dreg);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement