mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-14 01:24:27 +00:00
Networks and Sites: Extract into a new function the email that gets sent to the network administrator when a new site is created, and introduce filters to disable and modify its
contents. * The `send_new_site_email` filter can be used to disable this email. * The `new_site_email` filter can be used to modify its contents. Props Dhruvin, Dharm1025, dharmin16, jipmoors Fixes #42134 git-svn-id: https://develop.svn.wordpress.org/trunk@49127 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -145,31 +145,7 @@ if ( isset( $_REQUEST['action'] ) && 'add-site' === $_REQUEST['action'] ) {
|
||||
update_user_option( $user_id, 'primary_blog', $id, true );
|
||||
}
|
||||
|
||||
wp_mail(
|
||||
get_site_option( 'admin_email' ),
|
||||
sprintf(
|
||||
/* translators: New site notification email subject. %s: Network title. */
|
||||
__( '[%s] New Site Created' ),
|
||||
get_network()->site_name
|
||||
),
|
||||
sprintf(
|
||||
/* translators: New site notification email. 1: User login, 2: Site URL, 3: Site title. */
|
||||
__(
|
||||
'New site created by %1$s
|
||||
|
||||
Address: %2$s
|
||||
Name: %3$s'
|
||||
),
|
||||
$current_user->user_login,
|
||||
get_site_url( $id ),
|
||||
wp_unslash( $title )
|
||||
),
|
||||
sprintf(
|
||||
'From: "%1$s" <%2$s>',
|
||||
_x( 'Site Admin', 'email "From" field' ),
|
||||
get_site_option( 'admin_email' )
|
||||
)
|
||||
);
|
||||
wpmu_new_site_admin_notification( $id, $user_id );
|
||||
wpmu_welcome_notification( $id, $user_id, $password, $title, array( 'public' => 1 ) );
|
||||
wp_redirect(
|
||||
add_query_arg(
|
||||
|
||||
Reference in New Issue
Block a user