-
-
Save Kaiderella/34fe5adb6d077e3198a92ff21c3d583c to your computer and use it in GitHub Desktop.
Remove jQuery Migrate
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
function remove_jquery_migrate( $scripts ) { | |
if ( ! is_admin() && isset( $scripts->registered['jquery'] ) ) { | |
$script = $scripts->registered['jquery']; | |
if ( $script->deps ) { | |
$script->deps = array_diff( $script->deps, array( 'jquery-migrate' ) ); | |
} | |
} | |
} | |
add_action( 'wp_default_scripts', 'remove_jquery_migrate' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment