mirror of
https://github.com/WordPress/WordPress.git
synced 2025-03-09 07:00:01 +00:00
Fall back to default theme if current theme is deleted. Props David House. fixes #2305
git-svn-id: http://svn.automattic.com/wordpress/trunk@3459 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
f6c66d873d
commit
6ff524425a
@ -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…
x
Reference in New Issue
Block a user