diff --git a/wp-admin/network/site-new.php b/wp-admin/network/site-new.php
index 0b404ea..d18418f 100644
a
|
b
|
if ( isset($_REQUEST['action']) && 'add-site' == $_REQUEST['action'] ) { |
136 | 136 | update_user_option( $user_id, 'primary_blog', $id, true ); |
137 | 137 | } |
138 | 138 | |
139 | | wp_mail( |
140 | | get_site_option( 'admin_email' ), |
141 | | sprintf( |
142 | | /* translators: %s: network name */ |
143 | | __( '[%s] New Site Created' ), |
144 | | get_network()->site_name |
145 | | ), |
146 | | sprintf( |
147 | | /* translators: 1: user login, 2: site url, 3: site name/title */ |
148 | | __( 'New site created by %1$s |
| 139 | /** |
| 140 | * Filter to disable Email notification sent when new site is created for multisite. |
| 141 | * |
| 142 | * @param bool $send Whether to send the email. |
| 143 | */ |
| 144 | |
| 145 | $send_new_multisite_email = apply_filters( 'send_new_multisite_email', true ); |
| 146 | if( $send_new_multisite_email ) { |
| 147 | wp_mail( |
| 148 | get_site_option( 'admin_email' ), |
| 149 | sprintf( |
| 150 | /* translators: %s: network name */ |
| 151 | __( '[%s] New Site Created' ), |
| 152 | get_network()->site_name |
| 153 | ), |
| 154 | sprintf( |
| 155 | /* translators: 1: user login, 2: site url, 3: site name/title */ |
| 156 | __( 'New site created by %1$s |
149 | 157 | |
150 | 158 | Address: %2$s |
151 | 159 | Name: %3$s' ), |
152 | | $current_user->user_login, |
153 | | get_site_url( $id ), |
154 | | wp_unslash( $title ) |
155 | | ), |
156 | | sprintf( |
157 | | 'From: "%1$s" <%2$s>', |
158 | | _x( 'Site Admin', 'email "From" field' ), |
159 | | get_site_option( 'admin_email' ) |
160 | | ) |
161 | | ); |
| 160 | $current_user->user_login, |
| 161 | get_site_url( $id ), |
| 162 | wp_unslash( $title ) |
| 163 | ), |
| 164 | sprintf( |
| 165 | 'From: "%1$s" <%2$s>', |
| 166 | _x( 'Site Admin', 'email "From" field' ), |
| 167 | get_site_option( 'admin_email' ) |
| 168 | ) |
| 169 | ); |
| 170 | } |
| 171 | |
162 | 172 | wpmu_welcome_notification( $id, $user_id, $password, $title, array( 'public' => 1 ) ); |
163 | 173 | wp_redirect( add_query_arg( array( 'update' => 'added', 'id' => $id ), 'site-new.php' ) ); |
164 | 174 | exit; |