diff --git a/wp-activate.php b/wp-activate.php index 1ec40287d..4f7207094 100644 --- a/wp-activate.php +++ b/wp-activate.php @@ -63,9 +63,9 @@ get_header(); '; if ( $signup->domain . $signup->path == '' ) { - printf( __('Your account has been activated. You may now log in 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 reset your password.'), network_site_url( 'wp-login.php', 'login' ), $signup->user_login, $signup->user_email, network_site_url( 'wp-login.php?action=lostpassword', 'login' ) ); + printf( __('Your account has been activated. You may now log in 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 reset your password.'), network_site_url( 'wp-login.php', 'login' ), $signup->user_login, $signup->user_email, wp_lostpassword_url() ); } else { - printf( __('Your site at %2$s 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 reset your password.'), 'http://' . $signup->domain, $signup->domain, $signup->user_login, $signup->user_email, network_site_url( 'wp-login.php?action=lostpassword' ) ); + printf( __('Your site at %2$s 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 reset your password.'), 'http://' . $signup->domain, $signup->domain, $signup->user_login, $signup->user_email, wp_lostpassword_url() ); } echo '

'; } else { diff --git a/wp-includes/general-template.php b/wp-includes/general-template.php index 0d9821c22..315b2e30d 100644 --- a/wp-includes/general-template.php +++ b/wp-includes/general-template.php @@ -288,14 +288,14 @@ function wp_login_form( $args = array() ) { * * @param string $redirect Path to redirect to on login. */ -function wp_lostpassword_url($redirect = '') { +function wp_lostpassword_url( $redirect = '' ) { $args = array( 'action' => 'lostpassword' ); if ( !empty($redirect) ) { $args['redirect_to'] = $redirect; } - $lostpassword_url = add_query_arg($args, site_url('wp-login.php', 'login')); - return apply_filters('lostpassword_url', $lostpassword_url, $redirect); + $lostpassword_url = add_query_arg( $args, network_site_url('wp-login.php', 'login') ); + return apply_filters( 'lostpassword_url', $lostpassword_url, $redirect ); } /** diff --git a/wp-includes/user.php b/wp-includes/user.php index e3ca1310f..0ef049019 100644 --- a/wp-includes/user.php +++ b/wp-includes/user.php @@ -88,7 +88,7 @@ function wp_authenticate_username_password($user, $username, $password) { $userdata = get_user_by('login', $username); if ( !$userdata ) - return new WP_Error('invalid_username', sprintf(__('ERROR: Invalid username. Lost your password?'), site_url('wp-login.php?action=lostpassword', 'login'))); + return new WP_Error('invalid_username', sprintf(__('ERROR: Invalid username. Lost your password?'), wp_lostpassword_url())); if ( is_multisite() ) { // Is user marked as spam? @@ -109,7 +109,7 @@ function wp_authenticate_username_password($user, $username, $password) { if ( !wp_check_password($password, $userdata->user_pass, $userdata->ID) ) return new WP_Error( 'incorrect_password', sprintf( __( 'ERROR: The password you entered for the username %1$s is incorrect. Lost your password?' ), - $username, site_url( 'wp-login.php?action=lostpassword', 'login' ) ) ); + $username, wp_lostpassword_url() ) ); $user = new WP_User($userdata->ID); return $user; diff --git a/wp-login.php b/wp-login.php index f6b064697..8e7b79e28 100644 --- a/wp-login.php +++ b/wp-login.php @@ -530,7 +530,7 @@ case 'register' : | - + - +