diff --git a/includes/roots-cleanup.php b/includes/roots-cleanup.php index b5107d45de..025311c3d6 100644 --- a/includes/roots-cleanup.php +++ b/includes/roots-cleanup.php @@ -43,12 +43,13 @@ function roots_clean_plugins($content) { return $content; } -// only use clean urls if the theme isn't a child -if ($theme_data['Template'] === '') { +// only use clean urls if the theme isn't a child or an MU (Network) install +if ((!defined('WP_ALLOW_MULTISITE') || (defined('WP_ALLOW_MULTISITE') && WP_ALLOW_MULTISITE !== true)) && $theme_data['Template'] === '') { add_action('generate_rewrite_rules', 'roots_add_rewrites'); add_filter('plugins_url', 'roots_clean_plugins'); add_filter('bloginfo', 'roots_clean_assets'); add_filter('stylesheet_directory_uri', 'roots_clean_assets'); + add_filter('template_directory_uri', 'roots_clean_assets'); } // redirect /?s to /search/ @@ -73,6 +74,7 @@ function roots_root_relative_url($input) { add_filter('bloginfo_url', 'roots_root_relative_url'); add_filter('theme_root_uri', 'roots_root_relative_url'); add_filter('stylesheet_directory_uri', 'roots_root_relative_url'); +add_filter('template_directory_uri', 'roots_root_relative_url'); add_filter('the_permalink', 'roots_root_relative_url'); add_filter('wp_list_pages', 'roots_root_relative_url'); add_filter('wp_list_categories', 'roots_root_relative_url');