diff --git wp-admin/network/site-new.php wp-admin/network/site-new.php
index 0be051e..086b4e4 100644
|
|
|
if ( isset($_REQUEST['action']) && 'add-site' == $_REQUEST['action'] ) { |
| 57 | 57 | |
| 58 | 58 | $title = $blog['title']; |
| 59 | 59 | |
| | 60 | // Get specified theme or fallback to network theme or WP_DEFAULT_THEME constant |
| | 61 | $theme = wp_get_theme( $blog['theme'] ); |
| | 62 | if ( $theme->exists() ) { |
| | 63 | $stylesheet = $theme->get_stylesheet(); |
| | 64 | $template = $theme->get_template(); |
| | 65 | } else { |
| | 66 | $theme = wp_get_theme( get_network_option( null, 'default_theme', WP_DEFAULT_THEME ) ); |
| | 67 | $stylesheet = $theme->get_stylesheet(); |
| | 68 | $template = $theme->get_template(); |
| | 69 | } |
| | 70 | |
| 60 | 71 | $meta = array( |
| 61 | | 'public' => 1 |
| | 72 | 'public' => 1, |
| | 73 | 'stylesheet' => $stylesheet, |
| | 74 | 'template' => $template, |
| 62 | 75 | ); |
| 63 | 76 | |
| 64 | 77 | // Handle translation install for the new site. |
| … |
… |
if ( ! empty( $messages ) ) { |
| 246 | 259 | <tr class="form-field"> |
| 247 | 260 | <td colspan="2"><?php _e( 'A new user will be created if the above email address is not in the database.' ) ?><br /><?php _e( 'The username and password will be mailed to this email address.' ) ?></td> |
| 248 | 261 | </tr> |
| | 262 | |
| | 263 | <?php |
| | 264 | $themes = wp_get_themes( array( 'errors' => false, 'allowed' => 'network' ) ); |
| | 265 | if ( ! empty( $themes ) && is_array( $themes ) ) : ?> |
| | 266 | <tr class="form-field"> |
| | 267 | <th scope="row"><label for="site-theme"><?php _e( 'Site Theme' ); ?></label></th> |
| | 268 | <td> |
| | 269 | <?php |
| | 270 | // Network default. |
| | 271 | echo "<select name='blog[theme]' id='site-theme'>\n"; |
| | 272 | $default_theme = get_network_option( null, 'default_theme', WP_DEFAULT_THEME ); |
| | 273 | foreach ( $themes as $theme ) { |
| | 274 | printf( "\t<option value='%s' %s>%s</option>\n", |
| | 275 | $theme->stylesheet, |
| | 276 | selected( $theme->stylesheet, $default_theme, false ), |
| | 277 | $theme |
| | 278 | ); |
| | 279 | } |
| | 280 | echo "</select>\n"; |
| | 281 | ?> |
| | 282 | </td> |
| | 283 | </tr> |
| | 284 | <?php endif; // Theme. ?> |
| 249 | 285 | </table> |
| 250 | 286 | |
| 251 | 287 | <?php |