wppaste
WordPress

WP_Automatic_Updater::send_core_update_notification_email( object $item ): bool

Since
3.7.0
Source
wp-admin/includes/class-wp-automatic-updater.php:312
Notifies an administrator of a core update.

Parameters

$itemobject
The update offer.

Return

bool
True if the site administrator is notified of a core update, false otherwise.

Hooks fired · 1

One hook fires while WP_Automatic_Updater::send_core_update_notification_email() runs, in this order:

  1. apply_filters( send_core_update_notification_email )filterline 345 (+33 into the body)

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

Uses · 3

Used by · 1

Source

	protected function send_core_update_notification_email( $item ) {		$notified = get_site_option( 'auto_core_update_notified' ); 		// Don't notify if we've already notified the same email address of the same version.		if ( $notified			&& get_site_option( 'admin_email' ) === $notified['email']			&& $notified['version'] === $item->current		) {			return false;		} 		// See if we need to notify users of a core update.		$notify = ! empty( $item->notify_email ); 		/**		 * 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.		 *		 * @since 3.7.0		 *		 * @param bool   $notify Whether the site administrator is notified.		 * @param object $item   The update offer.		 */		if ( ! apply_filters( 'send_core_update_notification_email', $notify, $item ) ) {			return false;		} 		$this->send_email( 'manual', $item );		return true;	}

History

Introduced in 3.7.0. Unchanged from 6.7.7 through 7.1.0.

  1. 6.7.7
  2. 6.8.8
  3. 6.9.7
  4. 7.0.4
  5. 7.1.0

Signature, return type and hooks compared across 5 parsed releases.

About this page

Parsed data
Generated from the wordpress-develop 7.1.0 tag, from src/wp-admin/includes/class-wp-automatic-updater.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
Corrections
Something wrong on this page? Report it and it gets fixed in the next regeneration.