lostpassword_url
Filters the Lost Password URL.
Description
Parameters (2)
- 0. $lostpassword_url (string)
- The lost password page URL.
- 1. $redirect (string)
- The path to redirect to on login.
Usage
- To run the hook, copy the example below.
- $lostpassword_url = apply_filters( 'lostpassword_url', $lostpassword_url, $redirect );
- if ( !empty( $lostpassword_url ) ) {
- // everything has led up to this point...
- }
- The following example is for adding a hook callback.
- // define the lostpassword_url callback
- function filter_lostpassword_url( $lostpassword_url, $redirect ) {
- // make filter magic happen here...
- return $lostpassword_url;
- };
- // add the filter
- add_filter( 'lostpassword_url', 'filter_lostpassword_url', 10, 2 );
- To remove a hook callback, use the example below.
- // remove the filter
- remove_filter( 'lostpassword_url', 'filter_lostpassword_url', 10, 2 );
Defined (1)
The filter is defined in the following location(s).
- /wp-includes/general-template.php
- return apply_filters( 'lostpassword_url', $lostpassword_url, $redirect );