Skip to content

Instantly share code, notes, and snippets.

@robertcedwards
Created January 27, 2012 06:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save robertcedwards/1687524 to your computer and use it in GitHub Desktop.
Save robertcedwards/1687524 to your computer and use it in GitHub Desktop.
Wordpress wp_enqueue_script usage with jquery and CDNJS
// Load jQuery & NinjaUI
if ( !function_exists(core_mods) ) {
function core_mods() {
if ( !is_admin() ) {
wp_deregister_script('jquery');
wp_register_script('jquery', ("http://code.jquery.com/jquery-latest.min.js"), false);
wp_enqueue_script('jquery');
wp_register_script('ninjaui', ("http://cdnjs.cloudflare.com/ajax/libs/ninjaui/1.0.1/jquery.ninjaui.min.js"), false);
wp_enqueue_script('ninjaui');
}
}
core_mods();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment