Last active
October 7, 2021 14:07
-
-
Save itsHall/f215277fd7c2d36d61ab5e93d17a71c7 to your computer and use it in GitHub Desktop.
Removes WP Injected Jquery (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
<?php | |
//------------------// | |
// Remove WP Jquery // | |
//------------------// | |
function change_default_jquery( ){ | |
wp_dequeue_script( 'jquery'); | |
wp_deregister_script( 'jquery'); | |
} | |
add_filter( 'wp_enqueue_scripts', 'change_default_jquery', PHP_INT_MAX ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If switching to jQuery CDN, use this instead: https://gist.github.com/itsHall/bdfd03dfa981a1e3af1ddd1e55f2d2c4