automatic_updates_debug_email хук-фильтрWP 3.8.0

Filters the debug email that can be sent following an automatic background core update.

Использование

add_filter( 'automatic_updates_debug_email', 'wp_kama_automatic_updates_debug_email_filter', 10, 3 );

/**
 * Function for `automatic_updates_debug_email` filter-hook.
 * 
 * @param array $email    Array of email arguments that will be passed to wp_mail().
 * @param int   $failures The number of failures encountered while upgrading.
 * @param mixed $results  The results of all attempted updates.
 *
 * @return array
 */
function wp_kama_automatic_updates_debug_email_filter( $email, $failures, $results ){

	// filter...
	return $email;
}
$email(массив)

Array of email arguments that will be passed to wp_mail().

  • to(строка)
    The email recipient. An array of emails can be returned, as handled by wp_mail().

  • subject(строка)
    Email subject.

  • body(строка)
    Email message body.

  • headers(строка)
    Any email headers.
    По умолчанию: ''
$failures(int)
The number of failures encountered while upgrading.
$results(разное)
The results of all attempted updates.

Список изменений

С версии 3.8.0 Введена.

Где вызывается хук

WP_Automatic_Updater::send_debug_email()
automatic_updates_debug_email
wp-admin/includes/class-wp-automatic-updater.php 1485
$email = apply_filters( 'automatic_updates_debug_email', $email, $failures, $this->update_results );

Где используется хук в WordPress

Использование не найдено.