Created
January 27, 2012 06:51
-
-
Save robertcedwards/1687524 to your computer and use it in GitHub Desktop.
Wordpress wp_enqueue_script usage with jquery and CDNJS
This file contains hidden or 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
// 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