auto_core_update_send_email хук-фильтрWP 3.7.0

Filters whether to send an email following an automatic background core update.

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

add_filter( 'auto_core_update_send_email', 'wp_kama_auto_core_update_send_email_filter', 10, 4 );

/**
 * Function for `auto_core_update_send_email` filter-hook.
 * 
 * @param bool   $send        Whether to send the email.
 * @param string $type        The type of email to send. Can be one of 'success', 'fail', 'critical'.
 * @param object $core_update The update offer that was attempted.
 * @param mixed  $result      The result for the core update. Can be WP_Error.
 *
 * @return bool
 */
function wp_kama_auto_core_update_send_email_filter( $send, $type, $core_update, $result ){

	// filter...
	return $send;
}
$send(true|false)
Whether to send the email.
По умолчанию: true
$type(строка)
The type of email to send. Can be one of 'success', 'fail', 'critical'.
$core_update(объект)
The update offer that was attempted.
$result(разное)
The result for the core update. Can be WP_Error.

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

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

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

WP_Automatic_Updater::send_email()
auto_core_update_send_email
wp-admin/includes/class-wp-automatic-updater.php 709
if ( 'manual' !== $type && ! apply_filters( 'auto_core_update_send_email', true, $type, $core_update, $result ) ) {

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

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