From 687ce2919f9a8886ea12bd261baffaef6a1fdddd Mon Sep 17 00:00:00 2001 From: ryan Date: Tue, 13 Apr 2010 21:56:57 +0000 Subject: [PATCH] Use WP_FALLBACK_THEME instead of default. Props MichaelH. see #12846 git-svn-id: http://svn.automattic.com/wordpress/trunk@14080 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/upgrade.php | 6 +++--- wp-includes/comment-template.php | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/wp-admin/includes/upgrade.php b/wp-admin/includes/upgrade.php index 250bb6520..693b0d9cc 100644 --- a/wp-admin/includes/upgrade.php +++ b/wp-admin/includes/upgrade.php @@ -1613,7 +1613,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/default/index.php', "$site_dir/$newfile")) + if (! @copy(WP_CONTENT_DIR . '/themes/'.WP_FALLBACK_THEME.'/index.php', "$site_dir/$newfile")) return false; continue; // Don't copy anything } @@ -1673,7 +1673,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/default'; + $default_dir = WP_CONTENT_DIR . '/themes/'.WP_FALLBACK_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'); @@ -1769,7 +1769,7 @@ function make_site_theme() { // Make the new site theme active. $current_template = __get_option('template'); - if ($current_template == 'default') { + if ($current_template == WP_FALLBACK_THEME) { update_option('template', $template); update_option('stylesheet', $template); } diff --git a/wp-includes/comment-template.php b/wp-includes/comment-template.php index 6da86096e..abeaef0e9 100644 --- a/wp-includes/comment-template.php +++ b/wp-includes/comment-template.php @@ -890,7 +890,7 @@ function comments_template( $file = '/comments.php', $separate_comments = false elseif ( file_exists( TEMPLATEPATH . $file ) ) require( TEMPLATEPATH . $file ); else - require( get_theme_root() . '/default/comments.php'); + require( get_theme_root() . '/'.WP_FALLBACK_THEME.'/comments.php'); } /**