diff --git a/wp-admin/network/settings.php b/wp-admin/network/settings.php
index 07f2a26..f6ea017 100644
a
|
b
|
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 ) ) { |
| 212 | echo "<select name='default_theme' id='default_theme'>\n"; |
| 213 | $default_theme = get_network_option( null, 'default_theme' ); |
| 214 | if ( ! empty( $default_theme ) ) { |
| 215 | echo "\t<option value='" . $default_theme . "'>" . wp_get_theme( $default_theme ) . "</option>\n"; |
| 216 | } |
| 217 | foreach ( $themes as $theme ) { |
| 218 | if ( $default_theme === $theme->stylesheet ) { |
| 219 | continue; |
| 220 | } |
| 221 | echo "\t<option value='" . $theme->stylesheet . "'>" . $theme . "</option>\n"; |
| 222 | } |
| 223 | echo "</select>\n"; |
| 224 | } |
| 225 | ?> |
| 226 | </td> |
| 227 | </tr> |
| 228 | <tr> |
207 | 229 | <th scope="row"><label for="welcome_email"><?php _e( 'Welcome Email' ) ?></label></th> |
208 | 230 | <td> |
209 | 231 | <textarea name="welcome_email" id="welcome_email" aria-describedby="welcome-email-desc" rows="5" cols="45" class="large-text"> |
diff --git a/wp-includes/ms-functions.php b/wp-includes/ms-functions.php
index ca81761..8486e8f 100644
a
|
b
|
function wpmu_create_blog( $domain, $path, $title, $user_id, $meta = array(), $s |
1126 | 1126 | |
1127 | 1127 | add_user_to_blog($blog_id, $user_id, 'administrator'); |
1128 | 1128 | |
| 1129 | $default_theme = get_network_option( null, 'default_theme' ); |
| 1130 | if ( ! empty( $default_theme ) ) { |
| 1131 | $theme = wp_get_theme( $default_theme ); |
| 1132 | if ( $theme->exists() ) { |
| 1133 | update_option( 'stylesheet', $theme->get_stylesheet() ); |
| 1134 | update_option( 'template', $theme->get_template() ); |
| 1135 | } |
| 1136 | } |
| 1137 | |
1129 | 1138 | foreach ( $meta as $key => $value ) { |
1130 | 1139 | if ( in_array( $key, array( 'public', 'archived', 'mature', 'spam', 'deleted', 'lang_id' ) ) ) |
1131 | 1140 | update_blog_status( $blog_id, $key, $value ); |