diff --git a/lib/scripts.php b/lib/scripts.php index 924c0c559c..4fb3c30da9 100644 --- a/lib/scripts.php +++ b/lib/scripts.php @@ -19,7 +19,14 @@ function roots_scripts() { * The build task in Grunt renames production assets with a hash * Read the asset names from assets-manifest.json */ - if (WP_ENV !== 'development') { + if (WP_ENV === 'development') { + $assets = array( + 'css' => '/assets/css/main.css', + 'js' => '/assets/js/scripts.js', + 'modernizr' => '/assets/vendor/modernizr/modernizr.js', + 'jquery' => '//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.js' + ); + } else { $get_assets = file_get_contents(get_template_directory() . '/assets/manifest.json'); $assets = json_decode($get_assets, true); $assets = array( @@ -28,13 +35,6 @@ function roots_scripts() { 'modernizr' => '/assets/js/vendor/modernizr.min.js', 'jquery' => '//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js' ); - } else { - $assets = array( - 'css' => '/assets/css/main.css', - 'js' => '/assets/js/scripts.js', - 'modernizr' => '/assets/vendor/modernizr/modernizr.js', - 'jquery' => '//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.js' - ); } wp_enqueue_style('roots_css', get_template_directory_uri() . $assets['css'], false, null);