WordPress.org

Make WordPress Core

Changeset 42688


Ignore:
Timestamp:
02/11/2018 12:22:21 PM (3 years ago)
Author:
SergeyBiryukov
Message:

Users: After [41163], add a notice for Email field on Profile screen that the new address will not become active until confirmed.

Props dilipbheda.
Fixes #43106. See #16470.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/user-edit.php

    r42343 r42688  
    486486    <tr class="user-email-wrap">
    487487        <th><label for="email"><?php _e( 'Email' ); ?> <span class="description"><?php _e( '(required)' ); ?></span></label></th>
    488         <td><input type="email" name="email" id="email" value="<?php echo esc_attr( $profileuser->user_email ); ?>" class="regular-text ltr" />
     488        <td><input type="email" name="email" id="email" aria-describedby="email-description" value="<?php echo esc_attr( $profileuser->user_email ); ?>" class="regular-text ltr" />
    489489        <?php
     490        if ( $profileuser->ID == $current_user->ID ) :
     491        ?>
     492        <p class="description" id="email-description">
     493            <?php _e( 'If you change this we will send you an email at your new address to confirm it. <strong>The new address will not become active until confirmed.</strong>' ); ?>
     494        </p>
     495        <?php
     496        endif;
     497
    490498        $new_email = get_user_meta( $current_user->ID, '_new_email', true );
    491499        if ( $new_email && $new_email['newemail'] != $current_user->user_email && $profileuser->ID == $current_user->ID ) :
Note: See TracChangeset for help on using the changeset viewer.