From 0bc22bb1fc3a7ed3a9698cf72a1137c7443ad4ae Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Fri, 13 Nov 2020 11:14:08 +0000 Subject: [PATCH] Upgrade/Install: Account for the `automatic_updater_disabled` filter in core auto-update settings UI. Follow-up to [49587]. Props markparnell, audrasjb. See #51742. Built from https://develop.svn.wordpress.org/trunk@49592 git-svn-id: http://core.svn.wordpress.org/trunk@49330 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/update-core.php | 9 +++++++-- wp-includes/version.php | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/wp-admin/update-core.php b/wp-admin/update-core.php index fb411ef0b6..dfd7b06a5a 100644 --- a/wp-admin/update-core.php +++ b/wp-admin/update-core.php @@ -348,8 +348,13 @@ function core_auto_updates_settings() { $can_set_update_option = false; } - if ( defined( 'AUTOMATIC_UPDATER_DISABLED' ) ) { - if ( true === AUTOMATIC_UPDATER_DISABLED ) { + if ( defined( 'AUTOMATIC_UPDATER_DISABLED' ) + || has_filter( 'automatic_updater_disabled' ) + ) { + if ( true === AUTOMATIC_UPDATER_DISABLED + /** This filter is documented in wp-admin/includes/class-wp-automatic-updater.php */ + || true === apply_filters( 'automatic_updater_disabled', false ) + ) { $upgrade_dev = false; $upgrade_minor = false; $upgrade_major = false; diff --git a/wp-includes/version.php b/wp-includes/version.php index a4c42d9bbc..8968c90e6c 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.6-beta4-49591'; +$wp_version = '5.6-beta4-49592'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.