Created
June 22, 2016 17:36
-
-
Save jbrz0/bb6d03fdbdc20c5ede0d7c74d59a123e to your computer and use it in GitHub Desktop.
Script for overriding the default jquery injected in a theme by wordpress
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
//Replace the default WordPress jQuery script with a different one | |
function modify_jquery() { | |
if (!is_admin()) { | |
wp_deregister_script('jquery'); | |
wp_register_script('jquery', 'https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.min.js', false, '1.11.3'); | |
wp_enqueue_script('jquery'); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment