diff --git a/wp-admin/includes/schema.php b/wp-admin/includes/schema.php index f9f38fdeb..5a8e40cea 100644 --- a/wp-admin/includes/schema.php +++ b/wp-admin/includes/schema.php @@ -651,8 +651,8 @@ function populate_network( $network_id = 1, $domain = '', $email = '', $site_nam $allowed_themes = array( $stylesheet => true ); if ( $template != $stylesheet ) $allowed_themes[ $template ] = true; - if ( WP_FALLBACK_THEME != $stylesheet && WP_FALLBACK_THEME != $template ) - $allowed_themes[ WP_FALLBACK_THEME ] = true; + if ( WP_DEFAULT_THEME != $stylesheet && WP_DEFAULT_THEME != $template ) + $allowed_themes[ WP_DEFAULT_THEME ] = true; if ( 1 == $network_id ) { $wpdb->insert( $wpdb->site, array( 'domain' => $domain, 'path' => $path ) ); diff --git a/wp-admin/includes/upgrade.php b/wp-admin/includes/upgrade.php index 34a0803a1..1373b6584 100644 --- a/wp-admin/includes/upgrade.php +++ b/wp-admin/includes/upgrade.php @@ -1623,7 +1623,7 @@ function make_site_theme_from_oldschool($theme_name, $template) { if ($oldfile == 'index.php') { // Check to make sure it's not a new index $index = implode('', file("$oldpath/$oldfile")); if (strpos($index, 'WP_USE_THEMES') !== false) { - if (! @copy(WP_CONTENT_DIR . '/themes/'.WP_FALLBACK_THEME.'/index.php', "$site_dir/$newfile")) + if (! @copy(WP_CONTENT_DIR . '/themes/' . WP_DEFAULT_THEME . '/index.php', "$site_dir/$newfile")) return false; continue; // Don't copy anything } @@ -1683,7 +1683,7 @@ function make_site_theme_from_oldschool($theme_name, $template) { */ function make_site_theme_from_default($theme_name, $template) { $site_dir = WP_CONTENT_DIR . "/themes/$template"; - $default_dir = WP_CONTENT_DIR . '/themes/'.WP_FALLBACK_THEME; + $default_dir = WP_CONTENT_DIR . '/themes/' . WP_DEFAULT_THEME; // Copy files from the default theme to the site theme. //$files = array('index.php', 'comments.php', 'comments-popup.php', 'footer.php', 'header.php', 'sidebar.php', 'style.css'); @@ -1779,7 +1779,7 @@ function make_site_theme() { // Make the new site theme active. $current_template = __get_option('template'); - if ($current_template == WP_FALLBACK_THEME) { + if ($current_template == WP_DEFAULT_THEME) { update_option('template', $template); update_option('stylesheet', $template); } diff --git a/wp-includes/default-constants.php b/wp-includes/default-constants.php index f44fb6701..222eb3df5 100644 --- a/wp-includes/default-constants.php +++ b/wp-includes/default-constants.php @@ -286,18 +286,12 @@ function wp_templating_constants( ) { /** * Slug of the default theme for this install. * Used as the default theme when installing new sites. + * Will be used as the fallback if the current theme doesn't exist. * @since 3.0.0 */ if ( !defined('WP_DEFAULT_THEME') ) define( 'WP_DEFAULT_THEME', 'twentyten' ); - /** - * Slug of the fallback theme for this install. - * Will be used as the fallback if the current theme doesn't exist. - * @since 3.0.0 - */ - if ( !defined('WP_FALLBACK_THEME') ) - define( 'WP_FALLBACK_THEME', WP_DEFAULT_THEME ); } ?> diff --git a/wp-includes/theme.php b/wp-includes/theme.php index c58a9f51c..086542353 100644 --- a/wp-includes/theme.php +++ b/wp-includes/theme.php @@ -1207,13 +1207,13 @@ function switch_theme($template, $stylesheet) { /** * Checks that current theme files 'index.php' and 'style.css' exists. * - * Does not check the fallback theme. The fallback theme should always exist. + * Does not check the default theme, which is the fallback and should always exist. * Will switch theme to the fallback theme if current theme does not validate. * You can use the 'validate_current_theme' filter to return FALSE to * disable this functionality. * * @since 1.5.0 - * @see WP_FALLBACK_THEME + * @see WP_DEFAULT_THEME * * @return bool */ @@ -1222,13 +1222,13 @@ function validate_current_theme() { if ( defined('WP_INSTALLING') || !apply_filters( 'validate_current_theme', true ) ) return true; - if ( get_template() != WP_FALLBACK_THEME && !file_exists(get_template_directory() . '/index.php') ) { - switch_theme( WP_FALLBACK_THEME, WP_FALLBACK_THEME ); + if ( get_template() != WP_DEFAULT_THEME && !file_exists(get_template_directory() . '/index.php') ) { + switch_theme( WP_DEFAULT_THEME, WP_DEFAULT_THEME ); return false; } - if ( get_stylesheet() != WP_FALLBACK_THEME && !file_exists(get_template_directory() . '/style.css') ) { - switch_theme( WP_FALLBACK_THEME, WP_FALLBACK_THEME ); + if ( get_stylesheet() != WP_DEFAULT_THEME && !file_exists(get_template_directory() . '/style.css') ) { + switch_theme( WP_DEFAULT_THEME, WP_DEFAULT_THEME ); return false; }