lostpassword_redirect

Filters the URL redirected to after submitting the lostpassword/retrievepassword form.

Description

apply_filters( 'lostpassword_redirect', (string) $lostpassword_redirect ); 

Parameters (1)

0. $lostpassword_redirect (string)
The redirect destination URL.

Usage

To run the hook, copy the example below.
  1. $lostpassword_redirect = apply_filters( 'lostpassword_redirect', $lostpassword_redirect ); 
  2.  
  3. if ( !empty( $lostpassword_redirect ) ) { 
  4.  
  5. // everything has led up to this point... 
  6.  
  7.  
The following example is for adding a hook callback.
  1. // define the lostpassword_redirect callback 
  2. function filter_lostpassword_redirect( $lostpassword_redirect ) { 
  3. // make filter magic happen here... 
  4. return $lostpassword_redirect
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'lostpassword_redirect', 'filter_lostpassword_redirect', 10, 1 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'lostpassword_redirect', 'filter_lostpassword_redirect', 10, 1 ); 

Defined (1)

The filter is defined in the following location(s).

/wp-login.php  
  1. $redirect_to = apply_filters( 'lostpassword_redirect', $lostpassword_redirect );