author | ymh <ymh.work@gmail.com> |
Tue, 27 Sep 2022 16:37:53 +0200 | |
changeset 19 | 3d72ae0968f4 |
parent 18 | be944660c56a |
child 21 | 48c4eec2b7e6 |
permissions | -rw-r--r-- |
0 | 1 |
<?php |
2 |
/** |
|
3 |
* Add Site Administration Screen |
|
4 |
* |
|
5 |
* @package WordPress |
|
6 |
* @subpackage Multisite |
|
7 |
* @since 3.1.0 |
|
8 |
*/ |
|
9 |
||
10 |
/** Load WordPress Administration Bootstrap */ |
|
16 | 11 |
require_once __DIR__ . '/admin.php'; |
0 | 12 |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
13 |
/** WordPress Translation Installation API */ |
16 | 14 |
require_once ABSPATH . 'wp-admin/includes/translation-install.php'; |
0 | 15 |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
16 |
if ( ! current_user_can( 'create_sites' ) ) { |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
17 |
wp_die( __( 'Sorry, you are not allowed to add sites to this network.' ) ); |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
18 |
} |
0 | 19 |
|
9 | 20 |
get_current_screen()->add_help_tab( |
21 |
array( |
|
22 |
'id' => 'overview', |
|
23 |
'title' => __( 'Overview' ), |
|
24 |
'content' => |
|
25 |
'<p>' . __( 'This screen is for Super Admins to add new sites to the network. This is not affected by the registration settings.' ) . '</p>' . |
|
26 |
'<p>' . __( 'If the admin email for the new site does not exist in the database, a new user will also be created.' ) . '</p>', |
|
27 |
) |
|
28 |
); |
|
0 | 29 |
|
30 |
get_current_screen()->set_help_sidebar( |
|
9 | 31 |
'<p><strong>' . __( 'For more information:' ) . '</strong></p>' . |
16 | 32 |
'<p>' . __( '<a href="https://wordpress.org/support/article/network-admin-sites-screen/">Documentation on Site Management</a>' ) . '</p>' . |
9 | 33 |
'<p>' . __( '<a href="https://wordpress.org/support/forum/multisite/">Support Forums</a>' ) . '</p>' |
0 | 34 |
); |
35 |
||
16 | 36 |
if ( isset( $_REQUEST['action'] ) && 'add-site' === $_REQUEST['action'] ) { |
0 | 37 |
check_admin_referer( 'add-blog', '_wpnonce_add-blog' ); |
38 |
||
9 | 39 |
if ( ! is_array( $_POST['blog'] ) ) { |
19 | 40 |
wp_die( __( 'Cannot create an empty site.' ) ); |
9 | 41 |
} |
5 | 42 |
|
9 | 43 |
$blog = $_POST['blog']; |
0 | 44 |
$domain = ''; |
16 | 45 |
|
46 |
$blog['domain'] = trim( $blog['domain'] ); |
|
9 | 47 |
if ( preg_match( '|^([a-zA-Z0-9-])+$|', $blog['domain'] ) ) { |
0 | 48 |
$domain = strtolower( $blog['domain'] ); |
9 | 49 |
} |
0 | 50 |
|
16 | 51 |
// If not a subdomain installation, make sure the domain isn't a reserved word. |
0 | 52 |
if ( ! is_subdomain_install() ) { |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
53 |
$subdirectory_reserved_names = get_subdirectory_reserved_names(); |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
54 |
|
16 | 55 |
if ( in_array( $domain, $subdirectory_reserved_names, true ) ) { |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
56 |
wp_die( |
9 | 57 |
sprintf( |
16 | 58 |
/* translators: %s: Reserved names list. */ |
19 | 59 |
__( 'The following words are reserved for use by WordPress functions and cannot be used as site names: %s' ), |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
60 |
'<code>' . implode( '</code>, <code>', $subdirectory_reserved_names ) . '</code>' |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
61 |
) |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
62 |
); |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
63 |
} |
0 | 64 |
} |
65 |
||
66 |
$title = $blog['title']; |
|
67 |
||
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
68 |
$meta = array( |
9 | 69 |
'public' => 1, |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
70 |
); |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
71 |
|
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
72 |
// Handle translation installation for the new site. |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
73 |
if ( isset( $_POST['WPLANG'] ) ) { |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
74 |
if ( '' === $_POST['WPLANG'] ) { |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
75 |
$meta['WPLANG'] = ''; // en_US |
16 | 76 |
} elseif ( in_array( $_POST['WPLANG'], get_available_languages(), true ) ) { |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
77 |
$meta['WPLANG'] = $_POST['WPLANG']; |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
78 |
} elseif ( current_user_can( 'install_languages' ) && wp_can_install_language_pack() ) { |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
79 |
$language = wp_download_language_pack( wp_unslash( $_POST['WPLANG'] ) ); |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
80 |
if ( $language ) { |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
81 |
$meta['WPLANG'] = $language; |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
82 |
} |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
83 |
} |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
84 |
} |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
85 |
|
9 | 86 |
if ( empty( $domain ) ) { |
0 | 87 |
wp_die( __( 'Missing or invalid site address.' ) ); |
9 | 88 |
} |
5 | 89 |
|
90 |
if ( isset( $blog['email'] ) && '' === trim( $blog['email'] ) ) { |
|
0 | 91 |
wp_die( __( 'Missing email address.' ) ); |
5 | 92 |
} |
93 |
||
94 |
$email = sanitize_email( $blog['email'] ); |
|
95 |
if ( ! is_email( $email ) ) { |
|
0 | 96 |
wp_die( __( 'Invalid email address.' ) ); |
5 | 97 |
} |
0 | 98 |
|
99 |
if ( is_subdomain_install() ) { |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
100 |
$newdomain = $domain . '.' . preg_replace( '|^www\.|', '', get_network()->domain ); |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
101 |
$path = get_network()->path; |
0 | 102 |
} else { |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
103 |
$newdomain = get_network()->domain; |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
104 |
$path = get_network()->path . $domain . '/'; |
0 | 105 |
} |
106 |
||
107 |
$password = 'N/A'; |
|
9 | 108 |
$user_id = email_exists( $email ); |
16 | 109 |
if ( ! $user_id ) { // Create a new user with a random password. |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
110 |
/** |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
111 |
* Fires immediately before a new user is created via the network site-new.php page. |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
112 |
* |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
113 |
* @since 4.5.0 |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
114 |
* |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
115 |
* @param string $email Email of the non-existent user. |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
116 |
*/ |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
117 |
do_action( 'pre_network_site_new_created_user', $email ); |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
118 |
|
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
119 |
$user_id = username_exists( $domain ); |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
120 |
if ( $user_id ) { |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
121 |
wp_die( __( 'The domain or path entered conflicts with an existing username.' ) ); |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
122 |
} |
0 | 123 |
$password = wp_generate_password( 12, false ); |
9 | 124 |
$user_id = wpmu_create_user( $domain, $password, $email ); |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
125 |
if ( false === $user_id ) { |
0 | 126 |
wp_die( __( 'There was an error creating the user.' ) ); |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
127 |
} |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
128 |
|
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
129 |
/** |
9 | 130 |
* Fires after a new user has been created via the network site-new.php page. |
131 |
* |
|
132 |
* @since 4.4.0 |
|
133 |
* |
|
134 |
* @param int $user_id ID of the newly created user. |
|
135 |
*/ |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
136 |
do_action( 'network_site_new_created_user', $user_id ); |
0 | 137 |
} |
138 |
||
139 |
$wpdb->hide_errors(); |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
140 |
$id = wpmu_create_blog( $newdomain, $path, $title, $user_id, $meta, get_current_network_id() ); |
0 | 141 |
$wpdb->show_errors(); |
16 | 142 |
|
5 | 143 |
if ( ! is_wp_error( $id ) ) { |
9 | 144 |
if ( ! is_super_admin( $user_id ) && ! get_user_option( 'primary_blog', $user_id ) ) { |
0 | 145 |
update_user_option( $user_id, 'primary_blog', $id, true ); |
5 | 146 |
} |
147 |
||
18 | 148 |
wpmu_new_site_admin_notification( $id, $user_id ); |
0 | 149 |
wpmu_welcome_notification( $id, $user_id, $password, $title, array( 'public' => 1 ) ); |
9 | 150 |
wp_redirect( |
151 |
add_query_arg( |
|
152 |
array( |
|
153 |
'update' => 'added', |
|
154 |
'id' => $id, |
|
155 |
), |
|
156 |
'site-new.php' |
|
157 |
) |
|
158 |
); |
|
0 | 159 |
exit; |
160 |
} else { |
|
161 |
wp_die( $id->get_error_message() ); |
|
162 |
} |
|
163 |
} |
|
164 |
||
9 | 165 |
if ( isset( $_GET['update'] ) ) { |
0 | 166 |
$messages = array(); |
16 | 167 |
if ( 'added' === $_GET['update'] ) { |
5 | 168 |
$messages[] = sprintf( |
16 | 169 |
/* translators: 1: Dashboard URL, 2: Network admin edit URL. */ |
5 | 170 |
__( 'Site added. <a href="%1$s">Visit Dashboard</a> or <a href="%2$s">Edit Site</a>' ), |
171 |
esc_url( get_admin_url( absint( $_GET['id'] ) ) ), |
|
172 |
network_admin_url( 'site-info.php?id=' . absint( $_GET['id'] ) ) |
|
173 |
); |
|
9 | 174 |
} |
0 | 175 |
} |
176 |
||
19 | 177 |
// Used in the HTML title tag. |
9 | 178 |
$title = __( 'Add New Site' ); |
0 | 179 |
$parent_file = 'sites.php'; |
180 |
||
5 | 181 |
wp_enqueue_script( 'user-suggest' ); |
182 |
||
16 | 183 |
require_once ABSPATH . 'wp-admin/admin-header.php'; |
0 | 184 |
|
185 |
?> |
|
186 |
||
187 |
<div class="wrap"> |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
188 |
<h1 id="add-new-site"><?php _e( 'Add New Site' ); ?></h1> |
0 | 189 |
<?php |
190 |
if ( ! empty( $messages ) ) { |
|
9 | 191 |
foreach ( $messages as $msg ) { |
5 | 192 |
echo '<div id="message" class="updated notice is-dismissible"><p>' . $msg . '</p></div>'; |
9 | 193 |
} |
194 |
} |
|
195 |
?> |
|
196 |
<p> |
|
197 |
<?php |
|
198 |
printf( |
|
16 | 199 |
/* translators: %s: Asterisk symbol (*). */ |
9 | 200 |
__( 'Required fields are marked %s' ), |
201 |
'<span class="required">*</span>' |
|
202 |
); |
|
203 |
?> |
|
204 |
</p> |
|
18 | 205 |
<form method="post" action="<?php echo esc_url( network_admin_url( 'site-new.php?action=add-site' ) ); ?>" novalidate="novalidate"> |
9 | 206 |
<?php wp_nonce_field( 'add-blog', '_wpnonce_add-blog' ); ?> |
207 |
<table class="form-table" role="presentation"> |
|
0 | 208 |
<tr class="form-field form-required"> |
9 | 209 |
<th scope="row"><label for="site-address"><?php _e( 'Site Address (URL)' ); ?> <span class="required">*</span></label></th> |
0 | 210 |
<td> |
211 |
<?php if ( is_subdomain_install() ) { ?> |
|
16 | 212 |
<input name="blog[domain]" type="text" class="regular-text ltr" id="site-address" aria-describedby="site-address-desc" autocapitalize="none" autocorrect="off" required /><span class="no-break">.<?php echo preg_replace( '|^www\.|', '', get_network()->domain ); ?></span> |
9 | 213 |
<?php |
214 |
} else { |
|
215 |
echo get_network()->domain . get_network()->path |
|
216 |
?> |
|
16 | 217 |
<input name="blog[domain]" type="text" class="regular-text ltr" id="site-address" aria-describedby="site-address-desc" autocapitalize="none" autocorrect="off" required /> |
9 | 218 |
<?php |
219 |
} |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
220 |
echo '<p class="description" id="site-address-desc">' . __( 'Only lowercase letters (a-z), numbers, and hyphens are allowed.' ) . '</p>'; |
0 | 221 |
?> |
222 |
</td> |
|
223 |
</tr> |
|
224 |
<tr class="form-field form-required"> |
|
9 | 225 |
<th scope="row"><label for="site-title"><?php _e( 'Site Title' ); ?> <span class="required">*</span></label></th> |
226 |
<td><input name="blog[title]" type="text" class="regular-text" id="site-title" required /></td> |
|
0 | 227 |
</tr> |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
228 |
<?php |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
229 |
$languages = get_available_languages(); |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
230 |
$translations = wp_get_available_translations(); |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
231 |
if ( ! empty( $languages ) || ! empty( $translations ) ) : |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
232 |
?> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
233 |
<tr class="form-field form-required"> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
234 |
<th scope="row"><label for="site-language"><?php _e( 'Site Language' ); ?></label></th> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
235 |
<td> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
236 |
<?php |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
237 |
// Network default. |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
238 |
$lang = get_site_option( 'WPLANG' ); |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
239 |
|
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
240 |
// Use English if the default isn't available. |
16 | 241 |
if ( ! in_array( $lang, $languages, true ) ) { |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
242 |
$lang = ''; |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
243 |
} |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
244 |
|
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
245 |
wp_dropdown_languages( |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
246 |
array( |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
247 |
'name' => 'WPLANG', |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
248 |
'id' => 'site-language', |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
249 |
'selected' => $lang, |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
250 |
'languages' => $languages, |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
251 |
'translations' => $translations, |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
252 |
'show_available_translations' => current_user_can( 'install_languages' ) && wp_can_install_language_pack(), |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
253 |
) |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
254 |
); |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
255 |
?> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
256 |
</td> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
257 |
</tr> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
258 |
<?php endif; // Languages. ?> |
0 | 259 |
<tr class="form-field form-required"> |
9 | 260 |
<th scope="row"><label for="admin-email"><?php _e( 'Admin Email' ); ?> <span class="required">*</span></label></th> |
261 |
<td><input name="blog[email]" type="email" class="regular-text wp-suggest-user" id="admin-email" data-autocomplete-type="search" data-autocomplete-field="user_email" aria-describedby="site-admin-email" required /></td> |
|
0 | 262 |
</tr> |
263 |
<tr class="form-field"> |
|
9 | 264 |
<td colspan="2" class="td-full"><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> |
0 | 265 |
</tr> |
266 |
</table> |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
267 |
|
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
268 |
<?php |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
269 |
/** |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
270 |
* Fires at the end of the new site form in network admin. |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
271 |
* |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
272 |
* @since 4.5.0 |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
273 |
*/ |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
274 |
do_action( 'network_site_new_form' ); |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
275 |
|
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
276 |
submit_button( __( 'Add Site' ), 'primary', 'add-site' ); |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
277 |
?> |
0 | 278 |
</form> |
279 |
</div> |
|
280 |
<?php |
|
16 | 281 |
require_once ABSPATH . 'wp-admin/admin-footer.php'; |