Make WordPress Core

Ticket #9442: 9442-better.diff

File 9442-better.diff, 1.2 KB (added by Denis-de-Bernardy, 15 years ago)

better patch, from a localization standpoint. inserts the link directly into the error message

  • Users/denis/Sites/sem-pro/wp-includes/user.php

     
    8686        $userdata = get_userdatabylogin($username);
    8787
    8888        if ( !$userdata || ($userdata->user_login != $username) ) {
    89                 return new WP_Error('invalid_username', __('<strong>ERROR</strong>: Invalid username.'));
     89                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')));
    9090        }
    9191
    9292        $userdata = apply_filters('wp_authenticate_user', $userdata, $password);
     
    9595        }
    9696
    9797        if ( !wp_check_password($password, $userdata->user_pass, $userdata->ID) ) {
    98                 return new WP_Error('incorrect_password', __('<strong>ERROR</strong>: Incorrect password.'));
     98                return new WP_Error('incorrect_password', sprintf(__('<strong>ERROR</strong>: Incorrect password. <a href="%s" title="Password Lost and Found">Lost your password</a>?'), site_url('wp-login.php?action=lostpassword', 'login')));
    9999        }
    100100
    101101        $user =  new WP_User($userdata->ID);