Skip to content

Instantly share code, notes, and snippets.

Last active August 29, 2015 13:58
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
Add this to theme's `function.php`, in order to load jQuery from google cdn and jquery migrate from jQuery cdn (don't forget to update the plugin version)
/* loads minified jQuery (1.10.2) from Google CDN and jQuery migrate from jQuery CDN */
function jquery_cdn() {
if (!is_admin()) {
wp_register_script('jquery', '', false, '1.10.2');
wp_register_script('jquery-migrate', '', false, '1.2.1');
add_action('init', 'jquery_cdn');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment