diff --git a/CHANGELOG.md b/CHANGELOG.md index 59852082b3..63e9e9ee0b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,5 @@ ### HEAD +* Move JavaScript to footer * Update hEntry schema to use `updated` instead of `published` * Move variables into `main.less` * Add `roots_body_class` function that checks for page slug in `body_class` diff --git a/lib/scripts.php b/lib/scripts.php index ac3f22f573..573ff1f013 100644 --- a/lib/scripts.php +++ b/lib/scripts.php @@ -8,7 +8,7 @@ * Enqueue scripts in the following order: * 1. jquery-1.11.1.min.js via Google CDN * 2. /theme/assets/js/vendor/modernizr.min.js - * 3. /theme/assets/js/scripts.js (in footer) + * 3. /theme/assets/js/scripts.js * * Google Analytics is loaded after enqueued scripts if: * - An ID has been defined in config.php @@ -46,7 +46,7 @@ function roots_scripts() { */ if (!is_admin() && current_theme_supports('jquery-cdn')) { wp_deregister_script('jquery'); - wp_register_script('jquery', $assets['jquery'], array(), null, false); + wp_register_script('jquery', $assets['jquery'], array(), null, true); add_filter('script_loader_src', 'roots_jquery_local_fallback', 10, 2); } @@ -54,7 +54,7 @@ function roots_scripts() { wp_enqueue_script('comment-reply'); } - wp_enqueue_script('modernizr', get_template_directory_uri() . $assets['modernizr'], array(), null, false); + wp_enqueue_script('modernizr', get_template_directory_uri() . $assets['modernizr'], array(), null, true); wp_enqueue_script('jquery'); wp_enqueue_script('roots_js', get_template_directory_uri() . $assets['js'], array(), null, true); } @@ -79,7 +79,7 @@ function roots_jquery_local_fallback($src, $handle = null) { /** * Google Analytics snippet from HTML5 Boilerplate - * + * * Cookie domain is 'auto' configured. See: http://goo.gl/VUCHKM */ function roots_google_analytics() { ?>