Hide auto updates from update-core.php directly in get_core_updates(). see #22704.

Built from https://develop.svn.wordpress.org/trunk@25783


git-svn-id: http://core.svn.wordpress.org/trunk@25696 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Nacin 2013-10-15 05:07:10 +00:00
parent 957df34182
commit e503d0e2ec
2 changed files with 3 additions and 4 deletions

View File

@ -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;

View File

@ -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&ndash;<strong>%s</strong>", $update->current, $update->locale);
$current = false;