From fc4dd704c26dcd82713a72b5b099d2c32448de46 Mon Sep 17 00:00:00 2001 From: whyisjake Date: Fri, 31 Jul 2020 17:05:04 +0000 Subject: [PATCH] Upgrade/Install: Allow for WordPress.org to remotely disable auto-updates for plugins/themes As auto-updates are rolled out across WordPress.org, the API response can modulate the response, ensuring that a rolled out could be stalled or staggered if needed for security or performance reasons. This brings the changes from [48701] to the 5.5 branch. Fixes #50824. Props dd32, whyisjake, SergeyBiryukov. Built from https://develop.svn.wordpress.org/branches/5.5@48702 git-svn-id: http://core.svn.wordpress.org/branches/5.5@48464 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/class-wp-automatic-updater.php | 5 +++++ wp-includes/version.php | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/wp-admin/includes/class-wp-automatic-updater.php b/wp-admin/includes/class-wp-automatic-updater.php index e941f72faf..0862e29984 100644 --- a/wp-admin/includes/class-wp-automatic-updater.php +++ b/wp-admin/includes/class-wp-automatic-updater.php @@ -170,6 +170,11 @@ class WP_Automatic_Updater { $update = ! empty( $item->autoupdate ); } + // If the `disable_autoupdate` flag is set, override any user-choice, but allow filters. + if ( ! empty( $item->disable_autoupdate ) ) { + $update = $item->disable_autoupdate; + } + /** * Filters whether to automatically update core, a plugin, a theme, or a language. * diff --git a/wp-includes/version.php b/wp-includes/version.php index ca3fe350c7..0818ae2ec3 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.5-RC1-48698'; +$wp_version = '5.5-RC1-48702'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.