new_admin_email_content

Filters the email text sent when the site admin email is changed.

Description

apply_filters( 'new_admin_email_content', (string) $email_text, (string) $new_admin_email ); 

The following strings have a special meaning and will get replaced dynamically: ###USERNAME### The current user's username. ###ADMIN_URL### The link to click on to confirm the email change. ###EMAIL### The new email. ###SITENAME### The name of the site. ###SITEURL### The URL to the site.

Parameters (2)

0. $email_text (string)
Text in the email.
1. $new_admin_email (string)
New admin email that the current administration email was changed to.

Usage

To run the hook, copy the example below.
  1. $email_text = apply_filters( 'new_admin_email_content', $email_text, $new_admin_email ); 
  2.  
  3. if ( !empty( $email_text ) ) { 
  4.  
  5. // everything has led up to this point... 
  6.  
  7.  
The following example is for adding a hook callback.
  1. // define the new_admin_email_content callback 
  2. function filter_new_admin_email_content( $email_text, $new_admin_email ) { 
  3. // make filter magic happen here... 
  4. return $email_text
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'new_admin_email_content', 'filter_new_admin_email_content', 10, 2 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'new_admin_email_content', 'filter_new_admin_email_content', 10, 2 ); 

Defined (1)

The filter is defined in the following location(s).

/wp-admin/includes/ms.php  
  1. $content = apply_filters( 'new_admin_email_content', $email_text, $new_admin_email );