automatic_updates_debug_email
Filter HookDescription
Filters the debug email that can be sent following an automatic background core update. can be returned, as handled by wp_mail(). }Hook Information
File Location |
wp-admin/includes/class-wp-automatic-updater.php
View on GitHub
|
Hook Type | Filter |
Line Number | 1741 |
Hook Parameters
Type | Name | Description |
---|---|---|
array
|
$email
|
{ Array of email arguments that will be passed to wp_mail(). |
int
|
$failures
|
The number of failures encountered while upgrading. |
mixed
|
$results
|
The results of all attempted updates. |
Usage Examples
Basic Usage
<?php
// Hook into automatic_updates_debug_email
add_filter('automatic_updates_debug_email', 'my_custom_filter', 10, 3);
function my_custom_filter($email, $failures, $results) {
// Your custom filtering logic here
return $email;
}
Source Code Context
wp-admin/includes/class-wp-automatic-updater.php:1741
- How this hook is used in WordPress core
<?php
1736 * @type string $headers Any email headers. Default empty.
1737 * }
1738 * @param int $failures The number of failures encountered while upgrading.
1739 * @param mixed $results The results of all attempted updates.
1740 */
1741 $email = apply_filters( 'automatic_updates_debug_email', $email, $failures, $this->update_results );
1742
1743 wp_mail( $email['to'], wp_specialchars_decode( $email['subject'] ), $email['body'], $email['headers'] );
1744
1745 if ( $switched_locale ) {
1746 restore_previous_locale();
PHP Documentation
<?php
/**
* Filters the debug email that can be sent following an automatic
* background core update.
*
* @since 3.8.0
*
* @param array $email {
* Array of email arguments that will be passed to wp_mail().
*
* @type string $to The email recipient. An array of emails
* can be returned, as handled by wp_mail().
* @type string $subject Email subject.
* @type string $body Email message body.
* @type string $headers Any email headers. Default empty.
* }
* @param int $failures The number of failures encountered while upgrading.
* @param mixed $results The results of all attempted updates.
*/
Quick Info
- Hook Type: Filter
- Parameters: 3
- File: wp-admin/includes/class-wp-automatic-updater.php
Related Hooks
Related hooks will be displayed here in future updates.