mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 01:27:36 +01:00
Add a wp_lostpassword_url() function to complete the set. Based on patch from ramiy fixes #9932.
git-svn-id: http://svn.automattic.com/wordpress/trunk@11448 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
8a6eacda08
commit
e48a11f1fd
@ -196,6 +196,27 @@ function wp_login_url($redirect = '') {
|
||||
return apply_filters('login_url', $login_url, $redirect);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the Lost Password URL.
|
||||
*
|
||||
* Returns the URL that allows the user to retrieve the lost password
|
||||
*
|
||||
* @since 2.8.0
|
||||
* @uses site_url() To generate the lost password URL
|
||||
* @uses apply_filters() calls 'lostpassword_url' hook on the lostpassword url
|
||||
*
|
||||
* @param string $redirect Path to redirect to on login.
|
||||
*/
|
||||
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);
|
||||
}
|
||||
|
||||
/**
|
||||
* Display the Registration or Admin link.
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user