Filter hook 'retrieve_password_title'

in WP Core File wp-includes/user.php at line 3329

View Source

retrieve_password_title

Filter Hook
Description
Filters the subject of the password reset email.

Hook Information

File Location wp-includes/user.php View on GitHub
Hook Type Filter
Line Number 3329

Hook Parameters

Type Name Description
string $title Email subject.
string $user_login The username for the user.
WP_User $user_data WP_User object.

Usage Examples

Basic Usage
<?php
// Hook into retrieve_password_title
add_filter('retrieve_password_title', 'my_custom_filter', 10, 3);

function my_custom_filter($title, $user_login, $user_data) {
    // Your custom filtering logic here
    return $title;
}

Source Code Context

wp-includes/user.php:3329 - How this hook is used in WordPress core
<?php
3324  	 *
3325  	 * @param string  $title      Email subject.
3326  	 * @param string  $user_login The username for the user.
3327  	 * @param WP_User $user_data  WP_User object.
3328  	 */
3329  	$title = apply_filters( 'retrieve_password_title', $title, $user_login, $user_data );
3330  
3331  	/**
3332  	 * Filters the message body of the password reset mail.
3333  	 *
3334  	 * If the filtered message is empty, the password reset email will not be sent.

PHP Documentation

<?php
/**
	 * Filters the subject of the password reset email.
	 *
	 * @since 2.8.0
	 * @since 4.4.0 Added the `$user_login` and `$user_data` parameters.
	 *
	 * @param string  $title      Email subject.
	 * @param string  $user_login The username for the user.
	 * @param WP_User $user_data  WP_User object.
	 */
Quick Info
  • Hook Type: Filter
  • Parameters: 3
  • File: wp-includes/user.php
Related Hooks

Related hooks will be displayed here in future updates.