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.


git-svn-id: https://develop.svn.wordpress.org/branches/5.5@48702 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Jake Spurlock 2020-07-31 17:03:24 +00:00
parent b700cb82c7
commit 0ff10b7f0a

View File

@ -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.
*