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

Filters whether to notify the site administrator of a new core update.

By default, administrators are notified when the update offer received from WordPress.org sets a particular flag. This allows some discretion in if and when to notify.

This filter is only evaluated once per release. If the same email address was already notified of the same new version, WordPress won't repeatedly email the administrator.

This filter is also used on about.php to check if a plugin has disabled these notifications.

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

add_filter( 'send_core_update_notification_email', 'wp_kama_send_core_update_notification_email_filter', 10, 2 );

/**
 * Function for `send_core_update_notification_email` filter-hook.
 * 
 * @param bool   $notify Whether the site administrator is notified.
 * @param object $item   The update offer.
 *
 * @return bool
 */
function wp_kama_send_core_update_notification_email_filter( $notify, $item ){

	// filter...
	return $notify;
}
$notify(true|false)
Whether the site administrator is notified.
$item(объект)
The update offer.

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

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

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

WP_Automatic_Updater::send_core_update_notification_email()
send_core_update_notification_email
wp-admin/includes/class-wp-automatic-updater.php 290
if ( ! apply_filters( 'send_core_update_notification_email', $notify, $item ) ) {

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

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