made sure that the clean assets functions aren't being applied if you're

in the admin, cleaner way of including the theme options js/css now that
the clean assets function isn't interfering with get_template_directory_uri
This commit is contained in:
Ben Word
2011-07-31 00:34:53 -06:00
parent 3e17419dd3
commit 60bbec9176
2 changed files with 8 additions and 9 deletions

View File

@@ -45,10 +45,12 @@ function roots_clean_plugins($content) {
// 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)) && !is_child_theme()) {
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');
if (!is_admin()) {
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/