Make WordPress Core

Ticket #43706: 43706.1.patch

File 43706.1.patch, 2.4 KB (added by tremidkhar, 4 years ago)

The old email can be taken from the $old_value variable if ticket #52464 get resolved.

  • src/wp-admin/includes/misc.php

    diff --git a/src/wp-admin/includes/misc.php b/src/wp-admin/includes/misc.php
    index 61d7698310..6bd2c61fd9 100644
    a b function update_option_new_admin_email( $old_value, $value ) { 
    13531353
    13541354        $switched_locale = switch_to_locale( get_user_locale() );
    13551355
    1356         /* translators: Do not translate USERNAME, ADMIN_URL, EMAIL, SITENAME, SITEURL: those are placeholders. */
     1356        /* translators: Do not translate USERNAME, ADMIN_URL, OLD_EMAIL, NEW_EMAIL, SITENAME, SITEURL: those are placeholders. */
    13571357        $email_text = __(
    1358                 'Howdy ###USERNAME###,
     1358                'Howdy,
    13591359
    1360 You recently requested to have the administration email address on
    1361 your site changed.
     1360The user \'###USERNAME###\' recently requested to have the administration
     1361email address on your site changed to ###NEW_EMAIL###.
     1362
     1363The previous email address is ###OLD_EMAIL###.
    13621364
    13631365If this is correct, please click on the following link to change it:
    13641366###ADMIN_URL###
    If this is correct, please click on the following link to change it: 
    13661368You can safely ignore and delete this email if you do not want to
    13671369take this action.
    13681370
    1369 This email has been sent to ###EMAIL###
    1370 
    13711371Regards,
    13721372All at ###SITENAME###
    13731373###SITEURL###'
    All at ###SITENAME### 
    13791379         * The following strings have a special meaning and will get replaced dynamically:
    13801380         * ###USERNAME###  The current user's username.
    13811381         * ###ADMIN_URL### The link to click on to confirm the email change.
    1382          * ###EMAIL###     The proposed new site admin email address.
     1382         * ###OLD_EMAIL### The old site admin email address.
     1383         * ###NEW_EMAIL### The proposed new site admin email address.
    13831384         * ###SITENAME###  The name of the site.
    13841385         * ###SITEURL###   The URL to the site.
    13851386         *
    All at ###SITENAME### 
    13991400        $current_user = wp_get_current_user();
    14001401        $content      = str_replace( '###USERNAME###', $current_user->user_login, $content );
    14011402        $content      = str_replace( '###ADMIN_URL###', esc_url( self_admin_url( 'options.php?adminhash=' . $hash ) ), $content );
    1402         $content      = str_replace( '###EMAIL###', $value, $content );
     1403        $content      = str_replace( '###OLD_EMAIL###', $old_value, $content );
     1404        $content      = str_replace( '###NEW_EMAIL###', $value, $content );
    14031405        $content      = str_replace( '###SITENAME###', wp_specialchars_decode( get_option( 'blogname' ), ENT_QUOTES ), $content );
    14041406        $content      = str_replace( '###SITEURL###', home_url(), $content );
    14051407