email_change_email хук-фильтрWP 4.3.0

Filters the contents of the email sent when the user's email is changed.

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

add_filter( 'email_change_email', 'wp_kama_email_change_filter', 10, 3 );

/**
 * Function for `email_change_email` filter-hook.
 * 
 * @param array $email_change_email Used to build wp_mail().
 * @param array $user               The original user array.
 * @param array $userdata           The updated user array.
 *
 * @return array
 */
function wp_kama_email_change_filter( $email_change_email, $user, $userdata ){

	// filter...
	return $email_change_email;
}
$email_change_email(массив)

Used to build wp_mail().

  • to(строка)
    The intended recipients.

  • subject(строка)
    The subject of the email.

  • message(строка)
    The content of the email.

    The following strings have a special meaning and will get replaced dynamically:
    
    - ###USERNAME###    The current user's username.
    - ###ADMIN_EMAIL### The admin email in case this was unexpected.
    - ###NEW_EMAIL###   The new email address.
    - ###EMAIL###       The old email address.
    - ###SITENAME###    The name of the site.
    - ###SITEURL###     The URL to the site.
    
  • headers(строка)
    Headers.
$user(массив)
The original user array.
$userdata(массив)
The updated user array.

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

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

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

wp_update_user()
email_change_email
wp-includes/user.php 2830
$email_change_email = apply_filters( 'email_change_email', $email_change_email, $user, $userdata );

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

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