WordPress.org

Make WordPress Core

Changeset 23336


Ignore:
Timestamp:
01/23/2013 02:08:44 AM (9 years ago)
Author:
SergeyBiryukov
Message:

Simplify the logic for printing "Lost your password?" link. props ktdreyer. fixes #16498.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-login.php

    r22948 r23336  
    703703</form>
    704704
    705 <?php if ( !$interim_login ) { ?>
     705<?php if ( ! $interim_login ) { ?>
    706706<p id="nav">
    707 <?php if ( isset($_GET['checkemail']) && in_array( $_GET['checkemail'], array('confirm', 'newpass') ) ) : ?>
    708 <?php elseif ( get_option('users_can_register') ) : ?>
    709 <a href="<?php echo esc_url( site_url( 'wp-login.php?action=register', 'login' ) ); ?>"><?php _e( 'Register' ); ?></a> |
    710 <a href="<?php echo esc_url( wp_lostpassword_url() ); ?>" title="<?php esc_attr_e( 'Password Lost and Found' ); ?>"><?php _e( 'Lost your password?' ); ?></a>
    711 <?php else : ?>
    712 <a href="<?php echo esc_url( wp_lostpassword_url() ); ?>" title="<?php esc_attr_e( 'Password Lost and Found' ); ?>"><?php _e( 'Lost your password?' ); ?></a>
     707<?php if ( ! isset( $_GET['checkemail'] ) || ! in_array( $_GET['checkemail'], array( 'confirm', 'newpass' ) ) ) : ?>
     708    <?php if ( get_option( 'users_can_register' ) ) : ?>
     709    <a href="<?php echo esc_url( site_url( 'wp-login.php?action=register', 'login' ) ); ?>"><?php _e( 'Register' ); ?></a> |
     710    <?php endif; ?>
     711    <a href="<?php echo esc_url( wp_lostpassword_url() ); ?>" title="<?php esc_attr_e( 'Password Lost and Found' ); ?>"><?php _e( 'Lost your password?' ); ?></a>
    713712<?php endif; ?>
    714713</p>
Note: See TracChangeset for help on using the changeset viewer.