From 2eebc47254d7f5a44888d4b009e93914d1303905 Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Tue, 15 Oct 2013 05:06:35 +0000 Subject: [PATCH] Hide auto updates from update-core.php directly in get_core_updates(). see #22704. git-svn-id: https://develop.svn.wordpress.org/trunk@25783 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/update.php | 3 +++ src/wp-admin/update-core.php | 4 ---- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/wp-admin/includes/update.php b/src/wp-admin/includes/update.php index 8c086b1c6f..a71778d4e1 100644 --- a/src/wp-admin/includes/update.php +++ b/src/wp-admin/includes/update.php @@ -42,6 +42,9 @@ function get_core_updates( $options = array() ) { $updates = $from_api->updates; $result = array(); foreach ( $updates as $update ) { + if ( $update->response == 'autoupdate' ) + continue; + if ( array_key_exists( $update->current . '|' . $update->locale, $dismissed ) ) { if ( $options['dismissed'] ) { $update->dismissed = true; diff --git a/src/wp-admin/update-core.php b/src/wp-admin/update-core.php index 7a569ef2ff..16020320f3 100644 --- a/src/wp-admin/update-core.php +++ b/src/wp-admin/update-core.php @@ -25,10 +25,6 @@ function list_core_update( $update ) { global $wp_local_package, $wpdb; static $first_pass = true; - // Don't show auto-updates in the updates page - if ( isset( $update->response ) && 'autoupdate' == $update->response ) - return; - $version_string = ('en_US' == $update->locale && 'en_US' == get_locale() ) ? $update->current : sprintf("%s–%s", $update->current, $update->locale); $current = false;