retrieve_password_notification_email хук-фильтрWP 6.0.0

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 string  $key        The activation key.
 * @param string  $user_login The username for the user.
 * @param WP_User $user_data  WP_User object.
 *
 * @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.

Список изменений

С версии 6.0.0 Введена.

Где вызывается хук

retrieve_password()
retrieve_password_notification_email
wp-includes/user.php 3258
$notification_email = apply_filters( 'retrieve_password_notification_email', $defaults, $key, $user_login, $user_data );

Где используется хук в WordPress

Использование не найдено.