From e3e45236950a173b9b7e70f70747e250f8c104eb Mon Sep 17 00:00:00 2001 From: whyisjake Date: Fri, 31 Jul 2020 17:24:03 +0000 Subject: [PATCH] Upgrade/Install: Ensure the proper count of plugins that have auto-update enabled. As certain plugins may not support updates, this count needs to accurately reflect that in the navbar. This brings the changes from [48703] to the WordPress 5.5 branch. Fixes 50808. Props knutsp, audrasjb, pbiron, dd32, apedog, afragen, chriscct7, garyc40, whyisjake, SergeyBiryukov. Built from https://develop.svn.wordpress.org/branches/5.5@48704 git-svn-id: http://core.svn.wordpress.org/branches/5.5@48466 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/class-wp-plugins-list-table.php | 11 ++++++++--- wp-includes/version.php | 2 +- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/wp-admin/includes/class-wp-plugins-list-table.php b/wp-admin/includes/class-wp-plugins-list-table.php index eb33550d88..ff7a90b222 100644 --- a/wp-admin/includes/class-wp-plugins-list-table.php +++ b/wp-admin/includes/class-wp-plugins-list-table.php @@ -279,10 +279,15 @@ class WP_Plugins_List_Table extends WP_List_Table { } if ( $this->show_autoupdates ) { - if ( in_array( $plugin_file, $auto_updates, true ) ) { - $plugins['auto-update-enabled'][ $plugin_file ] = $plugins['all'][ $plugin_file ]; + $enabled = in_array( $plugin_file, $auto_updates, true ) && $plugin_data['update-supported']; + if ( isset( $plugin_data['auto-update-forced'] ) ) { + $enabled = (bool) $plugin_data['auto-update-forced']; + } + + if ( $enabled ) { + $plugins['auto-update-enabled'][ $plugin_file ] = $plugin_data; } else { - $plugins['auto-update-disabled'][ $plugin_file ] = $plugins['all'][ $plugin_file ]; + $plugins['auto-update-disabled'][ $plugin_file ] = $plugin_data; } } } diff --git a/wp-includes/version.php b/wp-includes/version.php index 0818ae2ec3..17480456c7 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.5-RC1-48702'; +$wp_version = '5.5-RC1-48704'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.