Created
September 10, 2013 11:21
-
-
Save slav123/6508035 to your computer and use it in GitHub Desktop.
downgrade jQuery on wordpress
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
<?php | |
// Downgrade to jQuery given version | |
function downgrade_jquery() { | |
global $wp_scripts; | |
// We want to use version 1.8.3 of jQuery, but it may break something in the admin so we only load it on the actual site. | |
if ( !is_admin() ) : | |
wp_deregister_script('jquery'); | |
wp_register_script('jquery', '//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js', false, '1.8.2'); | |
endif; | |
} | |
add_action( 'wp_head', downgrade_jquery() ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment