Skip to content

Commit

Permalink
Coding Standards: Give a variable in `WP_Automatic_Updater::after_cor…
Browse files Browse the repository at this point in the history
…e_update()` a more meaningful name.

Follow-up to [25841], [25873], [25882].

See #52627.

git-svn-id: https://develop.svn.wordpress.org/trunk@50759 602fd350-edb4-49c9-b593-d223f7449a82
  • Loading branch information
SergeyBiryukov committed Apr 15, 2021
1 parent 312b67e commit fd6ccf4
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions src/wp-admin/includes/class-wp-automatic-updater.php
Expand Up @@ -254,7 +254,10 @@ 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 ) {
if ( $notified
&& get_site_option( 'admin_email' ) === $notified['email']
&& $notified['version'] == $item->current
) {
return false;
}

Expand Down Expand Up @@ -624,9 +627,14 @@ protected function after_core_update( $update_result ) {
$send = false;
}

$n = get_site_option( 'auto_core_update_notified' );
$notified = get_site_option( 'auto_core_update_notified' );

// Don't notify if we've already notified the same email address of the same version of the same notification type.
if ( $n && 'fail' === $n['type'] && get_site_option( 'admin_email' ) === $n['email'] && $n['version'] == $core_update->current ) {
if ( $notified
&& 'fail' === $notified['type']
&& get_site_option( 'admin_email' ) === $notified['email']
&& $notified['version'] == $core_update->current
) {
$send = false;
}

Expand Down

0 comments on commit fd6ccf4

Please sign in to comment.