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.
- $title = apply_filters( 'retrieve_password_title', $title, $user_login, $user_data );
- if ( !empty( $title ) ) {
- // everything has led up to this point...
- }
- The following example is for adding a hook callback.
- // define the retrieve_password_title callback
- function filter_retrieve_password_title( $title, $user_login, $user_data ) {
- // make filter magic happen here...
- return $title;
- };
- // add the filter
- add_filter( 'retrieve_password_title', 'filter_retrieve_password_title', 10, 3 );
- To remove a hook callback, use the example below.
- // remove the filter
- 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
- $title = apply_filters( 'retrieve_password_title', $title, $user_login, $user_data );