Skip to content
Docs
Get RestroPress

Filter

rpress_get_lostpassword_url

Updated
On this page

Filters the URL of the lost password page.

Runs in rpress_get_lostpassword_url(). The default is the permalink of the page with slug forgot-password, or /forgot-password on the site if that page does not exist, with a redirect_to argument when a redirect is supplied.

Parameters#

ParameterTypeDescription
$urlstringThe lost password URL.
$redirectstringURL to return to after the reset, or an empty string.

Return value#

string. The lost password URL.

Example#

function my_lostpassword_url( $url, $redirect ) {
	return wp_lostpassword_url( $redirect );
}
add_filter( 'rpress_get_lostpassword_url', 'my_lostpassword_url', 10, 2 );

Notes#

Core registers its own callbacks for WPML and Weglot URL translation on this filter.

Source#

Applied in:

  • includes/user-functions.php (line 1150), in rpress_get_lostpassword_url()

See also#

Was this page helpful?