Make WordPress Core

Ticket #41514: 41514.3.diff

File 41514.3.diff, 1.1 KB (added by birgire, 7 years ago)

Refreshed the patch with respect to #40802

  • src/wp-login.php

    diff --git src/wp-login.php src/wp-login.php
    index 5159eab..2797ee0 100644
    default: 
    10071007
    10081008<?php if ( ! $interim_login ) { ?>
    10091009<p id="nav">
    1010 <?php if ( ! isset( $_GET['checkemail'] ) || ! in_array( $_GET['checkemail'], array( 'confirm', 'newpass' ) ) ) :
    1011         if ( get_option( 'users_can_register' ) ) :
    1012                 $registration_url = sprintf( '<a href="%s">%s</a>', esc_url( wp_registration_url() ), __( 'Register' ) );
     1010        <?php
     1011        if ( get_option( 'users_can_register' ) ) {
     1012                $registration_url = sprintf( '<a href="%s">%s</a>', esc_url( wp_registration_url() ), esc_html__( 'Register' ) );
    10131013
    10141014                /** This filter is documented in wp-includes/general-template.php */
    10151015                echo apply_filters( 'register', $registration_url );
    10161016
    10171017                echo esc_html( $login_link_separator );
    1018         endif;
     1018        }
     1019
     1020        if ( ! isset( $_GET['checkemail'] ) || 'newpass' !== $_GET['checkemail'] ) {
     1021                printf( '<a href="%s">%s</a>', esc_url( wp_lostpassword_url() ), esc_html__( 'Lost your password?' ) );
     1022        }
    10191023        ?>
    1020         <a href="<?php echo esc_url( wp_lostpassword_url() ); ?>"><?php _e( 'Lost your password?' ); ?></a>
    1021 <?php endif; ?>
    10221024</p>
    10231025<?php } ?>
    10241026