Make twentyten the fallback theme. see #9015
git-svn-id: http://svn.automattic.com/wordpress/trunk@13018 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
9a004ff9c8
commit
8e1a363a8d
|
@ -1160,13 +1160,15 @@ function validate_current_theme() {
|
|||
if ( defined('WP_INSTALLING') || !apply_filters( 'validate_current_theme', true ) )
|
||||
return true;
|
||||
|
||||
if ( get_template() != 'default' && !file_exists(get_template_directory() . '/index.php') ) {
|
||||
switch_theme('default', 'default');
|
||||
$fallback = 'twentyten';
|
||||
|
||||
if ( get_template() != $fallback && !file_exists(get_template_directory() . '/index.php') ) {
|
||||
switch_theme($fallback, $fallback);
|
||||
return false;
|
||||
}
|
||||
|
||||
if ( get_stylesheet() != 'default' && !file_exists(get_template_directory() . '/style.css') ) {
|
||||
switch_theme('default', 'default');
|
||||
if ( get_stylesheet() != $fallback && !file_exists(get_template_directory() . '/style.css') ) {
|
||||
switch_theme($fallback, $fallback);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue