$user =
apply_filters( 'wp_authenticate_user',
$user,
$password );
if ( is_wp_error( $user ) ) { return $user;
} if ( !
wp_check_password( $password,
$user->user_pass,
$user->ID
) ) { return new WP_Error( 'incorrect_password',
sprintf( /* translators: %s: User name. */
__( '<strong>Error:</strong> The password you entered for the username %s is incorrect.'
),
'<strong>' .
$username . '</strong>'
) .
' <a href="' .
wp_lostpassword_url() . '">' .
__( 'Lost your password?'
) .
'</a>'
);
}