Summery Summery
Notifies an administrator of a core update.
Syntax Syntax
Parameters Parameters
- $item
-
(Required) The update offer.
Source Source
File: wp-admin/includes/class-wp-automatic-updater.php
}
}
// If updating a plugin or theme, ensure the minimum PHP version requirements are satisfied.
if ( in_array( $type, array( 'plugin', 'theme' ), true ) ) {
if ( ! empty( $item->requires_php ) && version_compare( phpversion(), $item->requires_php, '<' ) ) {
return false;
}
}
return true;
}
/**
* Notifies an administrator of a core update.
*
* @since 3.7.0
*
* @param object $item The update offer.
*/
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.
Advertisement
Changelog Changelog
| Version | Description |
|---|---|
| 3.7.0 | Introduced. |