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
This commit is contained in:
ryan 2010-04-13 21:56:57 +00:00
parent 1f93931d55
commit 687ce2919f
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');
}
/**