diff --git wp-admin/network/site-new.php wp-admin/network/site-new.php
index 70d9f1c..f8a83c8 100644
|
|
if ( isset( $_REQUEST['action'] ) && 'add-site' == $_REQUEST['action'] ) { |
67 | 67 | 'public' => 1, |
68 | 68 | ); |
69 | 69 | |
| 70 | // Get specified theme or fallback to network theme or WP_DEFAULT_THEME constant |
| 71 | $theme = wp_get_theme( $blog['theme'] ); |
| 72 | if ( $theme->exists() ) { |
| 73 | $meta['stylesheet'] = $theme->get_stylesheet(); |
| 74 | $meta['template'] = $theme->get_template(); |
| 75 | |
| 76 | // Check if the theme is not network enabled |
| 77 | if ( ! in_array( $meta['stylesheet'], WP_Theme::get_allowed_on_network(), true) ) { |
| 78 | WP_Theme::network_enable_theme( $meta['stylesheet'] ); |
| 79 | } |
| 80 | } |
| 81 | |
70 | 82 | // Handle translation installation for the new site. |
71 | 83 | if ( isset( $_POST['WPLANG'] ) ) { |
72 | 84 | if ( '' === $_POST['WPLANG'] ) { |
… |
… |
printf( |
280 | 292 | <tr class="form-field"> |
281 | 293 | <td colspan="2"><p id="site-admin-email"><?php _e( 'A new user will be created if the above email address is not in the database.' ); ?><br /><?php _e( 'The username and a link to set the password will be mailed to this email address.' ); ?></p></td> |
282 | 294 | </tr> |
283 | | </table> |
284 | 295 | |
285 | | <?php |
| 296 | <?php $themes = wp_get_themes( array( 'errors' => false ) ); |
| 297 | if ( ! empty( $themes ) && is_array( $themes ) ) : ?> |
| 298 | <tr class="form-field"> |
| 299 | <th scope="row"><label for="site-theme"><?php _e( 'Site Theme' ); ?></label></th> |
| 300 | <td> |
| 301 | <select name="blog[theme]" id="site-theme"> |
| 302 | <?php foreach ( $themes as $theme ) : ?> |
| 303 | <option value="<?php echo $theme->stylesheet; ?>" <?php selected( $theme->stylesheet, WP_DEFAULT_THEME ); ?>><?php echo $theme; ?></option> |
| 304 | <?php endforeach; ?> |
| 305 | </select> |
| 306 | </td> |
| 307 | </tr> |
| 308 | <?php endif; // Theme. ?> |
| 309 | </table> |
| 310 | |
| 311 | <?php |
286 | 312 | /** |
287 | 313 | * Fires at the end of the new site form in network admin. |
288 | 314 | * |