Posted By

scottnix on 10/06/11


Tagged

google wordpress jquery thematic CDN


Versions (?)

WordPress Swap jQuery for Google CDN


 / Published in: PHP
 

Be sure to check for latest version (http://code.google.com/apis/libraries/devguide.html#jquery)

  1. // swap wordpress jquery for google hosted cdn
  2. function swap_jquery_for_cdn() {
  3. wp_deregister_script('jquery');
  4. wp_enqueue_script('jquery', ("http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"), false, '1.6.4', true);
  5. }
  6. add_action('wp_enqueue_scripts', 'swap_jquery_for_cdn');

Report this snippet  

You need to login to post a comment.