Ref #525 - Move css/, img/, and js/ into assets/
This commit is contained in:
@@ -33,10 +33,10 @@ if (stristr($_SERVER['SERVER_SOFTWARE'], 'apache') || stristr($_SERVER['SERVER_S
|
||||
function roots_add_rewrites($content) {
|
||||
global $wp_rewrite;
|
||||
$roots_new_non_wp_rules = array(
|
||||
'css/(.*)' => THEME_PATH . '/css/$1',
|
||||
'js/(.*)' => THEME_PATH . '/js/$1',
|
||||
'img/(.*)' => THEME_PATH . '/img/$1',
|
||||
'plugins/(.*)' => RELATIVE_PLUGIN_PATH . '/$1'
|
||||
'assets/css/(.*)' => THEME_PATH . '/assets/css/$1',
|
||||
'assets/js/(.*)' => THEME_PATH . '/assets/js/$1',
|
||||
'assets/img/(.*)' => THEME_PATH . '/assets/img/$1',
|
||||
'assets/plugins/(.*)' => RELATIVE_PLUGIN_PATH . '/$1'
|
||||
);
|
||||
$wp_rewrite->non_wp_rules = array_merge($wp_rewrite->non_wp_rules, $roots_new_non_wp_rules);
|
||||
return $content;
|
||||
|
||||
@@ -3,22 +3,22 @@
|
||||
* Scripts and stylesheets
|
||||
*
|
||||
* Enqueue stylesheets in the following order:
|
||||
* 1. /theme/css/bootstrap.css
|
||||
* 2. /theme/css/bootstrap-responsive.css
|
||||
* 3. /theme/css/app.css
|
||||
* 4. /child-theme/style.css (if a child theme is activated)
|
||||
* 1. /theme/assets/css/bootstrap.css
|
||||
* 2. /theme/assets/css/bootstrap-responsive.css
|
||||
* 3. /theme/assets/css/app.css
|
||||
* 4. /child-theme/style.css (if a child theme is activated)
|
||||
*
|
||||
* Enqueue scripts in the following order:
|
||||
* 1. /theme/js/vendor/modernizr-2.6.1.min.js (in head.php)
|
||||
* 2. jquery-1.8.0.min.js via Google CDN (in head.php)
|
||||
* 3. /theme/js/plugins.js
|
||||
* 4. /theme/js/main.js
|
||||
* 1. /theme/assets/js/vendor/modernizr-2.6.1.min.js (in head.php)
|
||||
* 2. jquery-1.8.0.min.js via Google CDN (in head.php)
|
||||
* 3. /theme/assets/js/plugins.js
|
||||
* 4. /theme/assets/js/main.js
|
||||
*/
|
||||
|
||||
function roots_scripts() {
|
||||
wp_enqueue_style('roots_bootstrap', get_template_directory_uri() . '/css/bootstrap.css', false, null);
|
||||
wp_enqueue_style('roots_bootstrap_responsive', get_template_directory_uri() . '/css/bootstrap-responsive.css', array('roots_bootstrap'), null);
|
||||
wp_enqueue_style('roots_app', get_template_directory_uri() . '/css/app.css', false, null);
|
||||
wp_enqueue_style('roots_bootstrap', get_template_directory_uri() . '/assets/css/bootstrap.css', false, null);
|
||||
wp_enqueue_style('roots_bootstrap_responsive', get_template_directory_uri() . '/assets/css/bootstrap-responsive.css', array('roots_bootstrap'), null);
|
||||
wp_enqueue_style('roots_app', get_template_directory_uri() . '/assets/css/app.css', false, null);
|
||||
|
||||
// Load style.css from child theme
|
||||
if (is_child_theme()) {
|
||||
@@ -37,8 +37,8 @@ function roots_scripts() {
|
||||
wp_enqueue_script('comment-reply');
|
||||
}
|
||||
|
||||
wp_register_script('roots_plugins', get_template_directory_uri() . '/js/plugins.js', false, null, false);
|
||||
wp_register_script('roots_main', get_template_directory_uri() . '/js/main.js', false, null, false);
|
||||
wp_register_script('roots_plugins', get_template_directory_uri() . '/assets/js/plugins.js', false, null, false);
|
||||
wp_register_script('roots_main', get_template_directory_uri() . '/assets/js/main.js', false, null, false);
|
||||
wp_enqueue_script('roots_plugins');
|
||||
wp_enqueue_script('roots_main');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user