Puddinq.com sharing knowledge
';

Remove jQuery migrate from WordPress

Remove jQuery migrate from WordPress

When WordPress is loaded it displays a jQuery migrate notice in the console. This means a part of software was loaded to be backward compatible. You can remove it:

/**
 * Remove jQuery migrate
 */

add_filter( 'wp_default_scripts', 'dequeue_jquery_migrate' );

function dequeue_jquery_migrate( &$scripts){
    if(!is_admin()){
        $scripts->remove( 'jquery');
        $scripts->add( 'jquery', false, array( 'jquery-core' ), '1.10.2' );
    }
}