retrieve_password_notification_email
Filter HookDescription
Filters the contents of the reset password notification email sent to the user. }Hook Information
File Location |
wp-includes/user.php
View on GitHub
|
Hook Type | Filter |
Line Number | 3379 |
Hook Parameters
Type | Name | Description |
---|---|---|
array
|
$defaults
|
{ The default notification email arguments. Used to build wp_mail(). |
string
|
$key
|
The activation key. |
string
|
$user_login
|
The username for the user. |
WP_User
|
$user_data
|
WP_User object. |
Usage Examples
Basic Usage
<?php
// Hook into retrieve_password_notification_email
add_filter('retrieve_password_notification_email', 'my_custom_filter', 10, 4);
function my_custom_filter($defaults, $key, $user_login, $user_data) {
// Your custom filtering logic here
return $defaults;
}
Source Code Context
wp-includes/user.php:3379
- How this hook is used in WordPress core
<?php
3374 * }
3375 * @param string $key The activation key.
3376 * @param string $user_login The username for the user.
3377 * @param WP_User $user_data WP_User object.
3378 */
3379 $notification_email = apply_filters( 'retrieve_password_notification_email', $defaults, $key, $user_login, $user_data );
3380
3381 if ( $switched_locale ) {
3382 restore_previous_locale();
3383 }
3384
PHP Documentation
<?php
/**
* Filters the contents of the reset password notification email sent to the user.
*
* @since 6.0.0
*
* @param array $defaults {
* The default notification email arguments. Used to build wp_mail().
*
* @type string $to The intended recipient - user email address.
* @type string $subject The subject of the email.
* @type string $message The body of the email.
* @type string $headers The headers of the email.
* }
* @param string $key The activation key.
* @param string $user_login The username for the user.
* @param WP_User $user_data WP_User object.
*/
Quick Info
- Hook Type: Filter
- Parameters: 4
- File: wp-includes/user.php
Related Hooks
Related hooks will be displayed here in future updates.