Skip to content

Instantly share code, notes, and snippets.

@roelven
Created March 12, 2011 12:58
Show Gist options
  • Save roelven/867222 to your computer and use it in GitHub Desktop.
Save roelven/867222 to your computer and use it in GitHub Desktop.
// Remove scripts from the wp script queue:
// credit http://justintadlock.com/archives/2009/08/06/how-to-disable-scripts-and-styles
function rv_deregister_javascript() {
wp_deregister_script('comment-reply');
wp_deregister_script('l10n');
}
// Replace jQuery 1.4.4 with 1.5 on the frontend
// as seen on http://codex.wordpress.org/Function_Reference/wp_enqueue_script
// Do not do this on the wp-admin, jQuery 1.5 might break functionality at this point (March 2011)
function rv_latest_jquery() {
if (!is_admin()) {
wp_deregister_script('jquery');
wp_register_script('jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js');
wp_enqueue_script('jquery');
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment