email_change_email WordPress Filter Hook

This hook is called whenever an email address is changed for a user. It allows you to do something with the old and new email addresses, for example, send an email to the old address notifying them of the change.

apply_filters( 'email_change_email', array $email_change_email, array $user, array $userdata ) #

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


Parameters

$email_change_email

(array)Used to build wp_mail().

  • 'to'
    (string) The intended recipients.
  • 'subject'
    (string) The subject of the email.
  • 'message'
    (string) 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'
    (string) Headers.

$user

(array)The original user array.

$userdata

(array)The updated user array.


Top ↑

Source

File: wp-includes/user.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
4.3.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More
Show More