retrieve_password_notification_email
Filters the contents of the reset password notification email sent to the user.
Использование
add_filter( 'retrieve_password_notification_email', 'wp_kama_retrieve_password_notification_email_filter', 10, 4 ); /** * Function for `retrieve_password_notification_email` filter-hook. * * @param array $defaults The default notification email arguments. Used to build wp_mail(). * @param $key * @param $user_login * @param $user_data * * @return array */ function wp_kama_retrieve_password_notification_email_filter( $defaults, $key, $user_login, $user_data ){ // filter... return $defaults; }
- $defaults(массив)
The default notification email arguments. Used to build wp_mail().
-
to(строка)
The intended recipient - user email address. -
subject(строка)
The subject of the email. -
message(строка)
The body of the email. -
headers(строка)
The headers of the email. } -
key(строка)
The activation key. -
user_login(строка)
The username for the user. - user_data(WP_User)
WP_User object.
-
- $key
- -
- $user_login
- -
- $user_data
- -
Список изменений
С версии 6.0.0 | Введена. |
Где вызывается хук
retrieve_password_notification_email
wp-includes/user.php 3212
$notification_email = apply_filters( 'retrieve_password_notification_email', $defaults, $key, $user_login, $user_data );