Merge master

This commit is contained in:
Ben Word
2013-02-05 16:13:43 -06:00
2 changed files with 9 additions and 9 deletions

View File

@@ -87,12 +87,12 @@ If you're using LESS, make sure you compile the files to the proper locations:
JavaScript is loaded in the following order:
1. `/theme/assets/js/vendor/modernizr-2.6.2.min.js`
2. `jquery-1.9.0.min.js` via Google CDN with local fallback
3. `/theme/assets/js/plugins.js`
4. `/theme/assets/js/main.js`
1. `jquery-1.9.0.min.js` via Google CDN with local fallback
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)
jQuery is loaded in `head.php` using the same method from HTML5 Boilerplate: grab Google CDN's jQuery, with a protocol relative URL; fall back to local if offline. It's kept in the header instead of footer to avoid conflicts with plugins.
jQuery is loaded using the same method from HTML5 Boilerplate: grab Google CDN's jQuery, with a protocol relative URL; fallback to local if offline. It's kept in the header instead of footer to avoid conflicts with plugins.
`plugins.js` contains a minified version of all the latest Bootstrap plugins.

View File

@@ -6,8 +6,8 @@
* 1. /theme/assets/css/main.min.css
*
* Enqueue scripts in the following order:
* 1. /theme/assets/js/vendor/modernizr-2.6.2.min.js
* 2. jquery-1.9.0.min.js via Google CDN
* 1. jquery-1.9.0.min.js via Google CDN
* 2. /theme/assets/js/vendor/modernizr-2.6.2.min.js
* 3. /theme/assets/js/scripts.min.js
*/
@@ -24,7 +24,7 @@ function roots_scripts() {
// It's kept in the header instead of footer to avoid conflicts with plugins.
if (!is_admin()) {
wp_deregister_script('jquery');
wp_register_script('jquery', '//ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js', array('modernizr'), null, false);
wp_register_script('jquery', '//ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js', false, null, false);
}
if (is_single() && comments_open() && get_option('thread_comments')) {
@@ -32,7 +32,7 @@ function roots_scripts() {
}
wp_register_script('modernizr', get_template_directory_uri() . '/assets/js/vendor/modernizr-2.6.2.min.js', false, null, false);
wp_register_script('roots_scripts', get_template_directory_uri() . '/assets/js/scripts.min.js', false, 'c40d165aabf0bf4734675f9fc726f3e6', false);
wp_register_script('roots_scripts', get_template_directory_uri() . '/assets/js/scripts.min.js', false, 'c40d165aabf0bf4734675f9fc726f3e6', true);
wp_enqueue_script('modernizr');
wp_enqueue_script('jquery');
wp_enqueue_script('roots_scripts');