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

@@ -4,11 +4,8 @@ function roots_admin_enqueue_scripts($hook_suffix) {
if ($hook_suffix !== 'appearance_page_theme_options')
return;
$home_url = home_url();
$theme_name = next(explode('/themes/', get_template_directory()));
wp_enqueue_style('roots-theme-options', "$home_url/wp-content/themes/$theme_name/inc/css/theme-options.css");
wp_enqueue_script('roots-theme-options', "$home_url/wp-content/themes/$theme_name/inc/js/theme-options.js");
wp_enqueue_style('roots-theme-options', get_template_directory_uri() . '/inc/css/theme-options.css');
wp_enqueue_script('roots-theme-options', get_template_directory_uri() . '/inc/js/theme-options.js');
}
add_action('admin_enqueue_scripts', 'roots_admin_enqueue_scripts');