Make WordPress Core


Ignore:
Timestamp:
02/10/2015 07:46:50 AM (10 years ago)
Author:
SergeyBiryukov
Message:

Replace generic "Dear user" greeting in email notifications with a more personalized one.

props Ipstenu.
fixes #31217.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/ms.php

    r31300 r31403  
    254254    update_option( 'adminhash', $new_admin_email );
    255255
    256     $email_text = __( 'Dear user,
     256    $email_text = __( 'Howdy ###USERNAME###,
    257257
    258258You recently requested to have the administration email address on
    259259your site changed.
     260
    260261If this is correct, please click on the following link to change it:
    261262###ADMIN_URL###
     
    274275     *
    275276     * The following strings have a special meaning and will get replaced dynamically:
     277     * ###USERNAME###  The current user's username.
    276278     * ###ADMIN_URL### The link to click on to confirm the email change. Required otherwise this functunalty is will break.
    277279     * ###EMAIL###     The new email.
     
    286288    $content = apply_filters( 'new_admin_email_content', $email_text, $new_admin_email );
    287289
     290    $content = str_replace( '###USERNAME###', $current_user->user_login, $content );
    288291    $content = str_replace( '###ADMIN_URL###', esc_url( admin_url( 'options.php?adminhash='.$hash ) ), $content );
    289292    $content = str_replace( '###EMAIL###', $value, $content );
     
    332335        update_option( $current_user->ID . '_new_email', $new_user_email );
    333336
    334         $email_text = __( 'Dear user,
     337        $email_text = __( 'Howdy ###USERNAME###,
    335338
    336339You recently requested to have the email address on your account changed.
     340
    337341If this is correct, please click on the following link to change it:
    338342###ADMIN_URL###
     
    351355         *
    352356         * The following strings have a special meaning and will get replaced dynamically:
     357         * ###USERNAME###  The current user's username.
    353358         * ###ADMIN_URL### The link to click on to confirm the email change. Required otherwise this functunalty is will break.
    354359         * ###EMAIL### The new email.
     
    363368        $content = apply_filters( 'new_user_email_content', $email_text, $new_user_email );
    364369
     370        $content = str_replace( '###USERNAME###', $current_user->user_login, $content );
    365371        $content = str_replace( '###ADMIN_URL###', esc_url( admin_url( 'profile.php?newuseremail='.$hash ) ), $content );
    366372        $content = str_replace( '###EMAIL###', $_POST['email'], $content);
Note: See TracChangeset for help on using the changeset viewer.