Fall back to default theme if current theme is deleted. Props David House. fixes #2305
git-svn-id: https://develop.svn.wordpress.org/trunk@3459 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
006f02c99c
commit
769f95e6e6
@ -1681,6 +1681,11 @@ function get_stylesheet_uri() {
|
||||
}
|
||||
|
||||
function get_template() {
|
||||
$template = get_settings('template');
|
||||
if (!file_exists(get_theme_root() . "/$template")) { //works for dirs too
|
||||
update_option('template', 'default');
|
||||
update_option('stylesheet', 'default');
|
||||
}
|
||||
return apply_filters('template', get_settings('template'));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user