WordPress.org

Make WordPress Core

Changeset 46203


Ignore:
Timestamp:
09/20/2019 06:50:19 PM (4 weeks 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.

Location:
trunk/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/css/login.css

    r45757 r46203  
    329329}
    330330
     331/* Hide visually but not from screen readers */
     332.screen-reader-text,
     333.screen-reader-text span {
     334    border: 0;
     335    clip: rect(1px, 1px, 1px, 1px);
     336    -webkit-clip-path: inset(50%);
     337    clip-path: inset(50%);
     338    height: 1px;
     339    margin: -1px;
     340    overflow: hidden;
     341    padding: 0;
     342    position: absolute;
     343    width: 1px;
     344    word-wrap: normal !important; /* many screen reader and browser combinations announce broken words as they would appear visually */
     345}
     346
    331347@-ms-viewport {
    332348    width: device-width;
  • 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.