Make WordPress Core


Ignore:
Timestamp:
09/20/2019 06:50:19 PM (7 years ago)
Author:
azaozz
Message:

Admin email verification:

  • Fix wording of the HTML title.
  • Add hidden (opens in a new tab) to links that need it.
  • Add the screen-reader-text CSS class to login.css.
  • Add another translator comment.

Props afercia.
See #46349.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-login.php

    r46192 r46203  
    607607                }
    608608
    609                 login_header( __( 'Confirm your admin email' ), '', $errors );
     609                login_header( __( 'Confirm your administration email' ), '', $errors );
    610610
    611611                /**
     
    644644                                $admin_email_help_url = __( 'https://wordpress.org/support/article/settings-general-screen/#email-address' );
    645645
     646                                /* translators: accessibility text */
     647                                $accessibility_text = sprintf( '<span class="screen-reader-text"> %s</span>', __( '(opens in a new tab)' ) );
     648
    646649                                printf(
    647                                         '<a href="%s" rel="noopener noreferrer" target="_blank">%s</a>',
     650                                        '<a href="%s" rel="noopener noreferrer" target="_blank">%s%s</a>',
    648651                                        esc_url( $admin_email_help_url ),
    649                                         __( 'Why is this important?' )
     652                                        __( 'Why is this important?' ),
     653                                        $accessibility_text
    650654                                );
    651655
     
    657661                                printf(
    658662                                        /* translators: %s: Admin email address. */
    659                                         __( 'Current administration email: %s' ),
    660                                         '<strong>' . esc_html( $admin_email ) . '</strong>'
     663                                        __( 'Current administration email: <strong>%s</strong>' ),
     664                                        esc_html( $admin_email )
    661665                                );
    662666
     
    665669                        <p class="admin-email__details">
    666670                                <?php _e( 'This email may be different from your personal email address.' ); ?>
    667                                 <?php
    668 
    669                                 printf(
    670                                         '<a href="%s" rel="noopener noreferrer" target="_blank">%s</a>',
    671                                         esc_url( $admin_email_help_url ),
    672                                         __( 'Learn more.' )
    673                                 );
    674 
    675                                 ?>
    676671                        </p>
    677672
     
    12491244                                /** This filter is documented in wp-login.php */
    12501245                                $admin_email_check_interval = (int) apply_filters( 'admin_email_check_interval', 180 * DAY_IN_SECONDS );
    1251 
     1246$admin_email_lifespan = 5;
    12521247                                if ( $admin_email_check_interval > 0 && time() > $admin_email_lifespan ) {
    12531248                                        $redirect_to = add_query_arg( 'action', 'confirm_admin_email', wp_login_url( $redirect_to ) );
     
    12551250                        }
    12561251
    1257                         if ( ( empty( $redirect_to ) || $redirect_to === 'wp-admin/' || $redirect_to == admin_url() ) ) {
     1252                        if ( ( empty( $redirect_to ) || $redirect_to === 'wp-admin/' || $redirect_to === admin_url() ) ) {
    12581253                                // If the user doesn't belong to a blog, send them to user admin. If the user can't edit posts, send them to their profile.
    12591254                                if ( is_multisite() && ! get_active_blog_for_user( $user->ID ) && ! is_super_admin( $user->ID ) ) {
Note: See TracChangeset for help on using the changeset viewer.