Make twentyten the fallback theme. see #9015
git-svn-id: https://develop.svn.wordpress.org/trunk@13018 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
685bd009b5
commit
ee112fbd12
|
@ -1160,13 +1160,15 @@ function validate_current_theme() {
|
||||||
if ( defined('WP_INSTALLING') || !apply_filters( 'validate_current_theme', true ) )
|
if ( defined('WP_INSTALLING') || !apply_filters( 'validate_current_theme', true ) )
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
if ( get_template() != 'default' && !file_exists(get_template_directory() . '/index.php') ) {
|
$fallback = 'twentyten';
|
||||||
switch_theme('default', 'default');
|
|
||||||
|
if ( get_template() != $fallback && !file_exists(get_template_directory() . '/index.php') ) {
|
||||||
|
switch_theme($fallback, $fallback);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( get_stylesheet() != 'default' && !file_exists(get_template_directory() . '/style.css') ) {
|
if ( get_stylesheet() != $fallback && !file_exists(get_template_directory() . '/style.css') ) {
|
||||||
switch_theme('default', 'default');
|
switch_theme($fallback, $fallback);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue