WordPress.org

Make WordPress Core

Ticket #19199: 19199-with-wp_login_url.patch

File 19199-with-wp_login_url.patch, 2.3 KB (added by ramiy, 3 years ago)

wp_lostpassword_url() & wp_login_url()

  • wp-login.php

     
    405405 
    406406?> 
    407407 
    408 <form name="lostpasswordform" id="lostpasswordform" action="<?php echo site_url('wp-login.php?action=lostpassword', 'login_post') ?>" method="post"> 
     408<form name="lostpasswordform" id="lostpasswordform" action="<?php echo wp_lostpassword_url() ?>" method="post"> 
    409409        <p> 
    410410                <label><?php _e('Username or E-mail:') ?><br /> 
    411411                <input type="text" name="user_login" id="user_login" class="input" value="<?php echo esc_attr($user_login); ?>" size="20" tabindex="10" /></label> 
     
    416416</form> 
    417417 
    418418<p id="nav"> 
    419 <a href="<?php echo site_url('wp-login.php', 'login') ?>"><?php _e('Log in') ?></a> 
     419<a href="<?php echo wp_login_url() ?>"><?php _e('Log in') ?></a> 
    420420<?php if (get_option('users_can_register')) : ?> 
    421421 | <a href="<?php echo site_url('wp-login.php?action=register', 'login') ?>"><?php _e('Register') ?></a> 
    422422<?php endif; ?> 
     
    441441                $errors = new WP_Error('password_reset_mismatch', __('The passwords do not match.')); 
    442442        } elseif ( isset($_POST['pass1']) && !empty($_POST['pass1']) ) { 
    443443                reset_password($user, $_POST['pass1']); 
    444                 login_header(__('Password Reset'), '<p class="message reset-pass">' . __('Your password has been reset.') . ' <a href="' . site_url('wp-login.php', 'login') . '">' . __('Log in') . '</a></p>'); 
     444                login_header(__('Password Reset'), '<p class="message reset-pass">' . __('Your password has been reset.') . ' <a href="' . wp_login_url() . '">' . __('Log in') . '</a></p>'); 
    445445                login_footer(); 
    446446                exit; 
    447447        } 
     
    472472</form> 
    473473 
    474474<p id="nav"> 
    475 <a href="<?php echo site_url('wp-login.php', 'login') ?>"><?php _e('Log in') ?></a> 
     475<a href="<?php echo wp_login_url() ?>"><?php _e('Log in') ?></a> 
    476476<?php if (get_option('users_can_register')) : ?> 
    477477 | <a href="<?php echo site_url('wp-login.php?action=register', 'login') ?>"><?php _e('Register') ?></a> 
    478478<?php endif; ?> 
     
    528528</form> 
    529529 
    530530<p id="nav"> 
    531 <a href="<?php echo site_url('wp-login.php', 'login') ?>"><?php _e('Log in') ?></a> | 
     531<a href="<?php echo wp_login_url() ?>"><?php _e('Log in') ?></a> | 
    532532<a href="<?php echo wp_lostpassword_url() ?>" title="<?php esc_attr_e('Password Lost and Found') ?>"><?php _e('Lost your password?') ?></a> 
    533533</p> 
    534534