|
86 | 86 | } |
87 | 87 |
|
88 | 88 | if ( is_subdomain_install() ) { |
89 | | - $newdomain = $domain . '.' . preg_replace( '|^www\.|', '', $current_site->domain ); |
90 | | - $path = $current_site->path; |
| 89 | + $newdomain = $domain . '.' . preg_replace( '|^www\.|', '', get_network()->domain ); |
| 90 | + $path = get_network()->path; |
91 | 91 | } else { |
92 | | - $newdomain = $current_site->domain; |
93 | | - $path = $current_site->path . $domain . '/'; |
| 92 | + $newdomain = get_network()->domain; |
| 93 | + $path = get_network()->path . $domain . '/'; |
94 | 94 | } |
95 | 95 |
|
96 | 96 | $password = 'N/A'; |
|
126 | 126 | } |
127 | 127 |
|
128 | 128 | $wpdb->hide_errors(); |
129 | | - $id = wpmu_create_blog( $newdomain, $path, $title, $user_id, $meta, $current_site->id ); |
| 129 | + $id = wpmu_create_blog( $newdomain, $path, $title, $user_id, $meta, get_current_network_id() ); |
130 | 130 | $wpdb->show_errors(); |
131 | 131 | if ( ! is_wp_error( $id ) ) { |
132 | 132 | if ( ! is_super_admin( $user_id ) && !get_user_option( 'primary_blog', $user_id ) ) { |
|
138 | 138 | sprintf( |
139 | 139 | /* translators: %s: network name */ |
140 | 140 | __( '[%s] New Site Created' ), |
141 | | - $current_site->site_name |
| 141 | + get_network()->site_name |
142 | 142 | ), |
143 | 143 | sprintf( |
144 | 144 | /* translators: 1: user login, 2: site url, 3: site name/title */ |
|
198 | 198 | <th scope="row"><label for="site-address"><?php _e( 'Site Address (URL)' ) ?></label></th> |
199 | 199 | <td> |
200 | 200 | <?php if ( is_subdomain_install() ) { ?> |
201 | | - <input name="blog[domain]" type="text" class="regular-text" id="site-address" aria-describedby="site-address-desc" autocapitalize="none" autocorrect="off"/><span class="no-break">.<?php echo preg_replace( '|^www\.|', '', $current_site->domain ); ?></span> |
| 201 | + <input name="blog[domain]" type="text" class="regular-text" id="site-address" aria-describedby="site-address-desc" autocapitalize="none" autocorrect="off"/><span class="no-break">.<?php echo preg_replace( '|^www\.|', '', get_network()->domain ); ?></span> |
202 | 202 | <?php } else { |
203 | | - echo $current_site->domain . $current_site->path ?><input name="blog[domain]" type="text" class="regular-text" id="site-address" aria-describedby="site-address-desc" autocapitalize="none" autocorrect="off" /> |
| 203 | + echo get_network()->domain . get_network()->path ?><input name="blog[domain]" type="text" class="regular-text" id="site-address" aria-describedby="site-address-desc" autocapitalize="none" autocorrect="off" /> |
204 | 204 | <?php } |
205 | 205 | echo '<p class="description" id="site-address-desc">' . __( 'Only lowercase letters (a-z), numbers, and hyphens are allowed.' ) . '</p>'; |
206 | 206 | ?> |
|
0 commit comments