diff --git wp-admin/includes/schema.php wp-admin/includes/schema.php
index 8ddc139..46a4d8f 100644
|
|
function populate_options() { |
367 | 367 | |
368 | 368 | // If WP_DEFAULT_THEME doesn't exist, fall back to the latest core default theme. |
369 | 369 | $stylesheet = $template = WP_DEFAULT_THEME; |
370 | | $theme = wp_get_theme( WP_DEFAULT_THEME ); |
371 | | if ( ! $theme->exists() ) { |
372 | | $theme = WP_Theme::get_core_default_theme(); |
| 370 | |
| 371 | // If it's multisite and WP_DEFAULT_THEME is not redifined in WP Config, get the network default theme |
| 372 | if ( is_multisite() && WP_DEFAULT_THEME === WP_Theme::get_core_default_theme()->get_template() ) { |
| 373 | $default_theme = get_site_option( 'default_theme' ); |
| 374 | if ( ! empty( $default_theme ) && WP_DEFAULT_THEME !== $default_theme ) { |
| 375 | $theme = wp_get_theme( $default_theme ); |
| 376 | if ( $theme->exists() ) { |
| 377 | $stylesheet = $theme->get_stylesheet(); |
| 378 | $template = $theme->get_template(); |
| 379 | } |
| 380 | } |
373 | 381 | } |
374 | 382 | |
375 | 383 | // If we can't find a core default theme, WP_DEFAULT_THEME is the best we can do. |
376 | | if ( $theme ) { |
| 384 | if ( ! isset( $theme ) ) { |
| 385 | $theme = wp_get_theme( WP_DEFAULT_THEME ); |
| 386 | if ( ! $theme->exists() ) { |
| 387 | $theme = WP_Theme::get_core_default_theme(); |
| 388 | } |
377 | 389 | $stylesheet = $theme->get_stylesheet(); |
378 | 390 | $template = $theme->get_template(); |
379 | | } |
| 391 | } |
380 | 392 | |
381 | 393 | $timezone_string = ''; |
382 | 394 | $gmt_offset = 0; |
diff --git wp-admin/network/settings.php wp-admin/network/settings.php
index 07f2a26..49c8d7f 100644
|
|
if ( $_POST ) { |
59 | 59 | 'first_post', 'first_page', 'first_comment', 'first_comment_url', 'first_comment_author', |
60 | 60 | 'welcome_email', 'welcome_user_email', 'fileupload_maxk', 'global_terms_enabled', |
61 | 61 | 'illegal_names', 'limited_email_domains', 'banned_email_domains', 'WPLANG', 'admin_email', |
62 | | 'first_comment_email', |
| 62 | 'first_comment_email', 'default_theme' |
63 | 63 | ); |
64 | 64 | |
65 | 65 | // Handle translation install. |
… |
… |
if ( isset( $_GET['updated'] ) ) { |
204 | 204 | <table class="form-table"> |
205 | 205 | |
206 | 206 | <tr> |
| 207 | <th scope="row"><label for="default_theme"><?php _e( 'Default Theme' ) ?></label></th> |
| 208 | <td> |
| 209 | <?php |
| 210 | $themes = wp_get_themes( array( 'errors' => false, 'allowed' => 'network' ) ); |
| 211 | if ( ! empty( $themes ) && is_array( $themes ) ) { |
| 212 | echo "<select name='default_theme' id='default_theme'>\n"; |
| 213 | $default_theme = get_site_option( 'default_theme' ); |
| 214 | foreach ( $themes as $theme ) { |
| 215 | printf( "\t<option value='%s' %s>%s</option>\n", |
| 216 | $theme->stylesheet, |
| 217 | selected( $theme->stylesheet, $default_theme, false ), |
| 218 | $theme |
| 219 | ); |
| 220 | } |
| 221 | echo "</select>\n"; |
| 222 | } |
| 223 | ?> |
| 224 | </td> |
| 225 | </tr> |
| 226 | <tr> |
207 | 227 | <th scope="row"><label for="welcome_email"><?php _e( 'Welcome Email' ) ?></label></th> |
208 | 228 | <td> |
209 | 229 | <textarea name="welcome_email" id="welcome_email" aria-describedby="welcome-email-desc" rows="5" cols="45" class="large-text"> |