retrieve_password_title

Filters the subject of the password reset email.

Description

apply_filters( 'retrieve_password_title', (string) $title, (string) $user_login, (WP_User) $user_data ); 

Parameters (3)

0. $title (string)
Default email title.
1. $user_login (string)
The username for the user.
2. $user_data (WP_User)
WP_User object.

Usage

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

Defined (1)

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

/wp-login.php  
  1. $title = apply_filters( 'retrieve_password_title', $title, $user_login, $user_data );