Ticket #18808: 18808-lostpassword2.diff
| File 18808-lostpassword2.diff, 6.0 KB (added by , 14 years ago) |
|---|
-
wp-login.php
530 530 531 531 <p id="nav"> 532 532 <a href="<?php echo site_url('wp-login.php', 'login') ?>"><?php _e('Log in') ?></a> | 533 <a href="<?php echo site_url('wp-login.php?action=lostpassword', 'login') ?>" title="<?php _e('Password Lost and Found') ?>"><?php _e('Lost your password?') ?></a>533 <a href="<?php echo wp_lostpassword_url() ?>" title="<?php _e('Password Lost and Found') ?>"><?php _e('Lost your password?') ?></a> 534 534 </p> 535 535 536 536 <?php … … 659 659 <?php if ( isset($_GET['checkemail']) && in_array( $_GET['checkemail'], array('confirm', 'newpass') ) ) : ?> 660 660 <?php elseif ( get_option('users_can_register') ) : ?> 661 661 <a href="<?php echo site_url('wp-login.php?action=register', 'login') ?>"><?php _e('Register') ?></a> | 662 <a href="<?php echo site_url('wp-login.php?action=lostpassword', 'login') ?>" title="<?php _e('Password Lost and Found') ?>"><?php _e('Lost your password?') ?></a>662 <a href="<?php echo wp_lostpassword_url() ?>" title="<?php _e('Password Lost and Found') ?>"><?php _e('Lost your password?') ?></a> 663 663 <?php else : ?> 664 <a href="<?php echo site_url('wp-login.php?action=lostpassword', 'login') ?>" title="<?php _e('Password Lost and Found') ?>"><?php _e('Lost your password?') ?></a>664 <a href="<?php echo wp_lostpassword_url() ?>" title="<?php _e('Password Lost and Found') ?>"><?php _e('Lost your password?') ?></a> 665 665 <?php endif; ?> 666 666 </p> 667 667 <?php } ?> -
wp-includes/user.php
88 88 $userdata = get_user_by('login', $username); 89 89 90 90 if ( !$userdata ) 91 return new WP_Error('invalid_username', sprintf(__('<strong>ERROR</strong>: Invalid username. <a href="%s" title="Password Lost and Found">Lost your password</a>?'), site_url('wp-login.php?action=lostpassword', 'login')));91 return new WP_Error('invalid_username', sprintf(__('<strong>ERROR</strong>: Invalid username. <a href="%s" title="Password Lost and Found">Lost your password</a>?'), wp_lostpassword_url())); 92 92 93 93 if ( is_multisite() ) { 94 94 // Is user marked as spam? … … 109 109 110 110 if ( !wp_check_password($password, $userdata->user_pass, $userdata->ID) ) 111 111 return new WP_Error( 'incorrect_password', sprintf( __( '<strong>ERROR</strong>: The password you entered for the username <strong>%1$s</strong> is incorrect. <a href="%2$s" title="Password Lost and Found">Lost your password</a>?' ), 112 $username, site_url( 'wp-login.php?action=lostpassword', 'login') ) );112 $username, wp_lostpassword_url() ) ); 113 113 114 114 $user = new WP_User($userdata->ID); 115 115 return $user; -
wp-includes/general-template.php
288 288 * 289 289 * @param string $redirect Path to redirect to on login. 290 290 */ 291 function wp_lostpassword_url( $redirect = '') {291 function wp_lostpassword_url( $redirect = '' ) { 292 292 $args = array( 'action' => 'lostpassword' ); 293 293 if ( !empty($redirect) ) { 294 294 $args['redirect_to'] = $redirect; 295 295 } 296 296 297 $lostpassword_url = add_query_arg( $args, site_url('wp-login.php', 'login'));298 return apply_filters( 'lostpassword_url', $lostpassword_url, $redirect);297 $lostpassword_url = add_query_arg( $args, network_site_url('wp-login.php', 'login') ); 298 return apply_filters( 'lostpassword_url', $lostpassword_url, $redirect ); 299 299 } 300 300 301 301 /** -
wp-activate.php
63 63 <?php 64 64 echo '<p class="lead-in">'; 65 65 if ( $signup->domain . $signup->path == '' ) { 66 printf( __('Your account has been activated. You may now <a href="%1$s">log in</a> to the site using your chosen username of “%2$s”. Please check your email inbox at %3$s for your password and login instructions. If you do not receive an email, please check your junk or spam folder. If you still do not receive an email within an hour, you can <a href="%4$s">reset your password</a>.'), network_site_url( 'wp-login.php', 'login' ), $signup->user_login, $signup->user_email, network_site_url( 'wp-login.php?action=lostpassword', 'login') );66 printf( __('Your account has been activated. You may now <a href="%1$s">log in</a> to the site using your chosen username of “%2$s”. Please check your email inbox at %3$s for your password and login instructions. If you do not receive an email, please check your junk or spam folder. If you still do not receive an email within an hour, you can <a href="%4$s">reset your password</a>.'), network_site_url( 'wp-login.php', 'login' ), $signup->user_login, $signup->user_email, wp_lostpassword_url() ); 67 67 } else { 68 printf( __('Your site at <a href="%1$s">%2$s</a> is active. You may now log in to your site using your chosen username of “%3$s”. Please check your email inbox at %4$s for your password and login instructions. If you do not receive an email, please check your junk or spam folder. If you still do not receive an email within an hour, you can <a href="%5$s">reset your password</a>.'), 'http://' . $signup->domain, $signup->domain, $signup->user_login, $signup->user_email, network_site_url( 'wp-login.php?action=lostpassword') );68 printf( __('Your site at <a href="%1$s">%2$s</a> is active. You may now log in to your site using your chosen username of “%3$s”. Please check your email inbox at %4$s for your password and login instructions. If you do not receive an email, please check your junk or spam folder. If you still do not receive an email within an hour, you can <a href="%5$s">reset your password</a>.'), 'http://' . $signup->domain, $signup->domain, $signup->user_login, $signup->user_email, wp_lostpassword_url() ); 69 69 } 70 70 echo '</p>'; 71 71 } else {