Replace generic "Dear user" greeting in email notifications with a more personalized one.
props Ipstenu. fixes #31217. Built from https://develop.svn.wordpress.org/trunk@31403 git-svn-id: http://core.svn.wordpress.org/trunk@31384 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -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 );
|
||||
|
||||
Reference in New Issue
Block a user