WordPress.org

Make WordPress Core

Ticket #12846: 12846.diff

File 12846.diff, 1.8 KB (added by MichaelH, 3 years ago)
  • wp-admin/includes/upgrade.php

     
    16131613                if ($oldfile == 'index.php') { // Check to make sure it's not a new index 
    16141614                        $index = implode('', file("$oldpath/$oldfile")); 
    16151615                        if (strpos($index, 'WP_USE_THEMES') !== false) { 
    1616                                 if (! @copy(WP_CONTENT_DIR . '/themes/default/index.php', "$site_dir/$newfile")) 
     1616                                if (! @copy(WP_CONTENT_DIR . '/themes/'.WP_FALLBACK_THEME.'/index.php', "$site_dir/$newfile")) 
    16171617                                        return false; 
    16181618                                continue; // Don't copy anything 
    16191619                                } 
     
    16731673 */ 
    16741674function make_site_theme_from_default($theme_name, $template) { 
    16751675        $site_dir = WP_CONTENT_DIR . "/themes/$template"; 
    1676         $default_dir = WP_CONTENT_DIR . '/themes/default'; 
     1676        $default_dir = WP_CONTENT_DIR . '/themes/'.WP_FALLBACK_THEME; 
    16771677 
    16781678        // Copy files from the default theme to the site theme. 
    16791679        //$files = array('index.php', 'comments.php', 'comments-popup.php', 'footer.php', 'header.php', 'sidebar.php', 'style.css'); 
     
    17691769 
    17701770        // Make the new site theme active. 
    17711771        $current_template = __get_option('template'); 
    1772         if ($current_template == 'default') { 
     1772        if ($current_template == WP_FALLBACK_THEME) { 
    17731773                update_option('template', $template); 
    17741774                update_option('stylesheet', $template); 
    17751775        } 
  • wp-includes/comment-template.php

     
    890890        elseif ( file_exists( TEMPLATEPATH . $file ) ) 
    891891                require( TEMPLATEPATH .  $file ); 
    892892        else 
    893                 require( get_theme_root() . '/default/comments.php'); 
     893                require( get_theme_root() . '/'.WP_FALLBACK_THEME.'/comments.php'); 
    894894} 
    895895 
    896896/**