Update to jQuery 1.10.1

This commit is contained in:
Fouppy
2013-05-31 16:14:18 +02:00
parent 7f2e6a33b7
commit 5b662cdeed
3 changed files with 9 additions and 8 deletions

View File

@@ -9,7 +9,7 @@
* 4. /child-theme/style.css (if a child theme is activated)
*
* Enqueue scripts in the following order:
* 1. jquery-1.9.1.min.js via Google CDN
* 1. jquery-1.10.1.min.js via Google CDN
* 2. /theme/assets/js/vendor/modernizr-2.6.2.min.js
* 3. /theme/assets/js/plugins.js (in footer)
* 4. /theme/assets/js/main.js (in footer)
@@ -29,7 +29,7 @@ function roots_scripts() {
// It's kept in the header instead of footer to avoid conflicts with plugins.
if (!is_admin() && current_theme_supports('jquery-cdn')) {
wp_deregister_script('jquery');
wp_register_script('jquery', '//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js', false, null, false);
wp_register_script('jquery', '//ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js', false, null, false);
add_filter('script_loader_src', 'roots_jquery_local_fallback', 10, 2);
}
@@ -52,7 +52,7 @@ function roots_jquery_local_fallback($src, $handle) {
static $add_jquery_fallback = false;
if ($add_jquery_fallback) {
echo '<script>window.jQuery || document.write(\'<script src="' . get_template_directory_uri() . '/assets/js/vendor/jquery-1.9.1.min.js"><\/script>\')</script>' . "\n";
echo '<script>window.jQuery || document.write(\'<script src="' . get_template_directory_uri() . '/assets/js/vendor/jquery-1.10.1.min.js"><\/script>\')</script>' . "\n";
$add_jquery_fallback = false;
}