mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-02 03:34:33 +00:00
Remove WP_FALLBACK_THEME, use WP_DEFAULT_THEME instead. We now only fall back to the default theme if the theme is broken. Incomplete themes that need to inherit templates will inherit them from wp-includes/theme-compat -- this behavior is deprecated. fixes #12846.
git-svn-id: https://develop.svn.wordpress.org/trunk@14485 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -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 ) );
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user