Make WordPress Core

Ticket #41514: 41514.diff

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

The register link displayed for checkemail=newpass and checkemail=confirm

  • src/wp-login.php

     
    931931
    932932<?php if ( ! $interim_login ) { ?>
    933933<p id="nav">
    934 <?php if ( ! isset( $_GET['checkemail'] ) || ! in_array( $_GET['checkemail'], array( 'confirm', 'newpass' ) ) ) :
    935         if ( get_option( 'users_can_register' ) ) :
     934        <?php
     935        if ( get_option( 'users_can_register' ) ) {
    936936                $registration_url = sprintf( '<a href="%s">%s</a>', esc_url( wp_registration_url() ), __( 'Register' ) );
    937937
    938938                /** This filter is documented in wp-includes/general-template.php */
    939                 echo apply_filters( 'register', $registration_url ) . ' | ';
    940         endif;
     939                echo apply_filters( 'register', $registration_url );
     940        }
     941
     942        if ( ! isset( $_GET['checkemail'] ) || ! in_array( $_GET['checkemail'], array( 'confirm', 'newpass' ) ) ) {
     943                printf( ' | <a href="%s">%s</a>', esc_url( wp_lostpassword_url() ), __( 'Lost your password?' ) );
     944        }
    941945        ?>
    942         <a href="<?php echo esc_url( wp_lostpassword_url() ); ?>"><?php _e( 'Lost your password?' ); ?></a>
    943 <?php endif; ?>
    944946</p>
    945947<?php } ?>
    946948