auto_core_update_email

Filters the email sent following an automatic background core update.

Description

apply_filters( 'auto_core_update_email', (array) $email, (string) $type, (object) $core_update, (mixed) $result ); 

Parameters (4)

0. $email (array)
1. $type (string)
The type of email being sent. Can be one of success,, fail., manual, critical.
2. $core_update (object)
The update offer that was attempted.
3. $result (mixed)
The result for the core update. Can be WP_Error.

Usage

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

Defined (1)

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

/wp-admin/includes/class-wp-automatic-updater.php  
  1. $email = apply_filters( 'auto_core_update_email', $email, $type, $core_update, $result );