diff options
| -rw-r--r-- | wp-admin/admin-functions.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/wp-admin/admin-functions.php b/wp-admin/admin-functions.php index 29c8b1b..fba1748 100644 --- a/wp-admin/admin-functions.php +++ b/wp-admin/admin-functions.php @@ -1274,14 +1274,14 @@ function validate_current_theme() { $template = get_settings('template'); $stylesheet = get_settings('stylesheet'); - if (($template != 'default') && (!file_exists("$theme_root/$template/index.php"))) { + if (($template != 'default') && (!file_exists( get_template_directory() . "/index.php"))) { update_option('template', 'default'); update_option('stylesheet', 'default'); do_action('switch_theme', 'Default'); return false; } - if (($stylesheet != 'default') && (!file_exists("$theme_root/$stylesheet/style.css"))) { + if (($stylesheet != 'default') && (!file_exists( get_stylesheet_directory() . "/style.css"))) { update_option('template', 'default'); update_option('stylesheet', 'default'); do_action('switch_theme', 'Default'); |
