diff --git a/src/wp-admin/includes/ms.php b/src/wp-admin/includes/ms.php index c58189e371..4a71f33087 100644 --- a/src/wp-admin/includes/ms.php +++ b/src/wp-admin/includes/ms.php @@ -253,10 +253,11 @@ function update_option_new_admin_email( $old_value, $value ) { ); update_option( 'adminhash', $new_admin_email ); - $email_text = __( 'Dear user, + $email_text = __( 'Howdy ###USERNAME###, You recently requested to have the administration email address on your site changed. + If this is correct, please click on the following link to change it: ###ADMIN_URL### @@ -273,6 +274,7 @@ All at ###SITENAME### * Filter the email text sent when the site admin email is changed. * * The following strings have a special meaning and will get replaced dynamically: + * ###USERNAME### The current user's username. * ###ADMIN_URL### The link to click on to confirm the email change. Required otherwise this functunalty is will break. * ###EMAIL### The new email. * ###SITENAME### The name of the site. @@ -285,6 +287,7 @@ All at ###SITENAME### */ $content = apply_filters( 'new_admin_email_content', $email_text, $new_admin_email ); + $content = str_replace( '###USERNAME###', $current_user->user_login, $content ); $content = str_replace( '###ADMIN_URL###', esc_url( admin_url( 'options.php?adminhash='.$hash ) ), $content ); $content = str_replace( '###EMAIL###', $value, $content ); $content = str_replace( '###SITENAME###', get_site_option( 'site_name' ), $content ); @@ -331,9 +334,10 @@ function send_confirmation_on_profile_email() { ); update_option( $current_user->ID . '_new_email', $new_user_email ); - $email_text = __( 'Dear user, + $email_text = __( 'Howdy ###USERNAME###, You recently requested to have the email address on your account changed. + If this is correct, please click on the following link to change it: ###ADMIN_URL### @@ -350,6 +354,7 @@ All at ###SITENAME### * Filter the email text sent when a user changes emails. * * The following strings have a special meaning and will get replaced dynamically: + * ###USERNAME### The current user's username. * ###ADMIN_URL### The link to click on to confirm the email change. Required otherwise this functunalty is will break. * ###EMAIL### The new email. * ###SITENAME### The name of the site. @@ -362,6 +367,7 @@ All at ###SITENAME### */ $content = apply_filters( 'new_user_email_content', $email_text, $new_user_email ); + $content = str_replace( '###USERNAME###', $current_user->user_login, $content ); $content = str_replace( '###ADMIN_URL###', esc_url( admin_url( 'profile.php?newuseremail='.$hash ) ), $content ); $content = str_replace( '###EMAIL###', $_POST['email'], $content); $content = str_replace( '###SITENAME###', get_site_option( 'site_name' ), $content ); diff --git a/src/wp-admin/includes/schema.php b/src/wp-admin/includes/schema.php index 020854b452..c522ab5665 100644 --- a/src/wp-admin/includes/schema.php +++ b/src/wp-admin/includes/schema.php @@ -917,7 +917,7 @@ function populate_network( $network_id = 1, $domain = '', $email = '', $site_nam $site_admins = get_site_option( 'site_admins' ); } - $welcome_email = __( 'Dear User, + $welcome_email = __( 'Howdy USERNAME, Your new SITE_NAME site has been successfully set up at: BLOG_URL diff --git a/src/wp-admin/ms-delete-site.php b/src/wp-admin/ms-delete-site.php index 00143089e2..dfaca6c148 100644 --- a/src/wp-admin/ms-delete-site.php +++ b/src/wp-admin/ms-delete-site.php @@ -26,6 +26,7 @@ if ( isset( $_GET['h'] ) && $_GET['h'] != '' && get_option( 'delete_blog_hash' ) } $blog = get_blog_details(); +$user = wp_get_current_user(); $title = __( 'Delete Site' ); $parent_file = 'tools.php'; @@ -42,9 +43,11 @@ if ( isset( $_POST['action'] ) && $_POST['action'] == 'deleteblog' && isset( $_P $url_delete = esc_url( admin_url( 'ms-delete-site.php?h=' . $hash ) ); - $content = __( "Dear User, + $content = __( "Howdy ###USERNAME###, + You recently clicked the 'Delete Site' link on your site and filled in a form on that page. + If you really want to delete your site, click the link below. You will not be asked to confirm again so only click this link if you are absolutely certain: ###URL_DELETE### @@ -65,6 +68,7 @@ Webmaster */ $content = apply_filters( 'delete_site_email_content', $content ); + $content = str_replace( '###USERNAME###', $user->user_login, $content ); $content = str_replace( '###URL_DELETE###', $url_delete, $content ); $content = str_replace( '###SITE_NAME###', $current_site->site_name, $content ); diff --git a/src/wp-includes/ms-functions.php b/src/wp-includes/ms-functions.php index d17daaf397..0e38638c9a 100644 --- a/src/wp-includes/ms-functions.php +++ b/src/wp-includes/ms-functions.php @@ -1434,7 +1434,7 @@ function wpmu_welcome_notification( $blog_id, $user_id, $password, $title, $meta $welcome_email = get_site_option( 'welcome_email' ); if ( $welcome_email == false ) - $welcome_email = __( 'Dear User, + $welcome_email = __( 'Howdy USERNAME, Your new SITE_NAME site has been successfully set up at: BLOG_URL @@ -2080,7 +2080,7 @@ function users_can_register_signup_filter() { function welcome_user_msg_filter( $text ) { if ( !$text ) { remove_filter( 'site_option_welcome_user_email', 'welcome_user_msg_filter' ); - $text = __( 'Dear User, + $text = __( 'Howdy USERNAME, Your new account is set up.