wp_lostpassword_url( string $redirect = '' )
Returns the URL that allows the user to retrieve the lost password
Description Description
Parameters Parameters
- $redirect
-
(string) (Optional) Path to redirect to on login.
Default value: ''
Return Return
(string) Lost password URL.
Source Source
File: wp-includes/general-template.php
function wp_lostpassword_url( $redirect = '' ) { $args = array(); if ( ! empty( $redirect ) ) { $args['redirect_to'] = urlencode( $redirect ); } $lostpassword_url = add_query_arg( $args, network_site_url( 'wp-login.php?action=lostpassword', 'login' ) ); /** * Filters the Lost Password URL. * * @since 2.8.0 * * @param string $lostpassword_url The lost password page URL. * @param string $redirect The path to redirect to on login. */ return apply_filters( 'lostpassword_url', $lostpassword_url, $redirect ); }
Expand full source code Collapse full source code View on Trac
Changelog Changelog
Version | Description |
---|---|
2.8.0 | Introduced. |
User Contributed Notes User Contributed Notes
You must log in before being able to contribute a note or feedback.
Default Usage
Lost Password and redirect to current page
Lost Password and redirect to homepage