Index: trunk/src/wp-admin/includes/class-wp-upgrader.php =================================================================== --- trunk/src/wp-admin/includes/class-wp-upgrader.php (revision 25977) +++ trunk/src/wp-admin/includes/class-wp-upgrader.php (revision 26013) @@ -2394,8 +2394,30 @@ } - //echo "
\n" . implode( "\n", $body ) . "\n"; - - wp_mail( get_site_option( 'admin_email' ), $subject, implode( "\n", $body ) ); + $email = array( + 'to' => get_site_option( 'admin_email' ), + 'subject' => $subject, + 'body' => implode( "\n", $body ), + 'headers' => '' + ); + + /** + * Filter 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 The email's subject. + * @type string $body The email message body. + * @type string $headers Any email headers, defaults to no headers. + * } + * @param int $failures The number of failures encountered while upgrading + * @param mixed $results The results of all updates attempted + */ + $email = apply_filters( 'automatic_updates_debug_email', $email, $failures, $this->update_results ); + + wp_mail( $email['to'], $email['subject'], $email['body'], $email['headers'] ); } }