Created
September 22, 2015 17:21
-
-
Save dmitry-korolev/5a254fd894aab95a5220 to your computer and use it in GitHub Desktop.
Remove jQuery from the front.
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 | |
/** | |
* Completely removes jQuery from the front. | |
*/ | |
function remove_jquery() { | |
if (!is_admin()) { | |
wp_deregister_script('jquery'); | |
wp_deregister_script('jquery-migrate'); | |
wp_register_script('jquery', '', false, '1.11.3', true); | |
wp_enqueue_script('jquery'); | |
} | |
} | |
add_action('init', 'remove_jquery'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment