equal
deleted
inserted
replaced
35 |
35 |
36 if ( isset( $_REQUEST['action'] ) && 'add-site' === $_REQUEST['action'] ) { |
36 if ( isset( $_REQUEST['action'] ) && 'add-site' === $_REQUEST['action'] ) { |
37 check_admin_referer( 'add-blog', '_wpnonce_add-blog' ); |
37 check_admin_referer( 'add-blog', '_wpnonce_add-blog' ); |
38 |
38 |
39 if ( ! is_array( $_POST['blog'] ) ) { |
39 if ( ! is_array( $_POST['blog'] ) ) { |
40 wp_die( __( 'Can’t create an empty site.' ) ); |
40 wp_die( __( 'Cannot create an empty site.' ) ); |
41 } |
41 } |
42 |
42 |
43 $blog = $_POST['blog']; |
43 $blog = $_POST['blog']; |
44 $domain = ''; |
44 $domain = ''; |
45 |
45 |
54 |
54 |
55 if ( in_array( $domain, $subdirectory_reserved_names, true ) ) { |
55 if ( in_array( $domain, $subdirectory_reserved_names, true ) ) { |
56 wp_die( |
56 wp_die( |
57 sprintf( |
57 sprintf( |
58 /* translators: %s: Reserved names list. */ |
58 /* translators: %s: Reserved names list. */ |
59 __( 'The following words are reserved for use by WordPress functions and cannot be used as blog names: %s' ), |
59 __( 'The following words are reserved for use by WordPress functions and cannot be used as site names: %s' ), |
60 '<code>' . implode( '</code>, <code>', $subdirectory_reserved_names ) . '</code>' |
60 '<code>' . implode( '</code>, <code>', $subdirectory_reserved_names ) . '</code>' |
61 ) |
61 ) |
62 ); |
62 ); |
63 } |
63 } |
64 } |
64 } |
172 network_admin_url( 'site-info.php?id=' . absint( $_GET['id'] ) ) |
172 network_admin_url( 'site-info.php?id=' . absint( $_GET['id'] ) ) |
173 ); |
173 ); |
174 } |
174 } |
175 } |
175 } |
176 |
176 |
|
177 // Used in the HTML title tag. |
177 $title = __( 'Add New Site' ); |
178 $title = __( 'Add New Site' ); |
178 $parent_file = 'sites.php'; |
179 $parent_file = 'sites.php'; |
179 |
180 |
180 wp_enqueue_script( 'user-suggest' ); |
181 wp_enqueue_script( 'user-suggest' ); |
181 |
182 |