WordPress at a glance

wp_lostpassword_url() WP 1.0

Returns the URL that allows the user to retrieve the lost password

Hooks from function:
Return

String. Lost password URL.

Usage

wp_lostpassword_url( $redirect );
$redirect(string)
Path to redirect to on login.
Default: ''

Code of wp_lostpassword_url: wp-includes/general-template.php VER 4.9.8

<?php
function wp_lostpassword_url( $redirect = '' ) {
	$args = array( 'action' => 'lostpassword' );
	if ( !empty($redirect) ) {
		$args['redirect_to'] = urlencode( $redirect );
	}

	$lostpassword_url = add_query_arg( $args, network_site_url('wp-login.php', '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 );
}

Related Functions

From tag: registration (login for users)

More from category: Login/Logout

More from Template Tags: Main Functions

No comments
    Hello, !     Log In . Register