Use WP_FALLBACK_THEME instead of default. Props MichaelH. see #12846

git-svn-id: https://develop.svn.wordpress.org/trunk@14080 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2010-04-13 21:56:57 +00:00
parent 7beb454ef2
commit c7eef601d4
2 changed files with 4 additions and 4 deletions

View File

@ -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);
}

View File

@ -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');
}
/**