Upgrade/Install: Account for new `WP_AUTO_UPDATE_CORE` values in auto-updates settings form.
This updates `core_auto_updates_settings()` to account for the new `beta` and `rc` values for the `WP_AUTO_UPDATE_CORE` constant. Additionally, recognize these new values as acceptable in Site Health tests. Follow-up to [48804], [49245], [49254]. Fixes #51319. See #50907. Built from https://develop.svn.wordpress.org/trunk@49292 git-svn-id: http://core.svn.wordpress.org/trunk@49054 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
e992757e5b
commit
bb63c1cbd9
|
@ -290,8 +290,7 @@ class Core_Upgrader extends WP_Upgrader {
|
||||||
$upgrade_dev = false;
|
$upgrade_dev = false;
|
||||||
$upgrade_minor = false;
|
$upgrade_minor = false;
|
||||||
$upgrade_major = false;
|
$upgrade_major = false;
|
||||||
} elseif (
|
} elseif ( true === WP_AUTO_UPDATE_CORE
|
||||||
true === WP_AUTO_UPDATE_CORE
|
|
||||||
|| 'beta' === WP_AUTO_UPDATE_CORE
|
|| 'beta' === WP_AUTO_UPDATE_CORE
|
||||||
|| 'rc' === WP_AUTO_UPDATE_CORE
|
|| 'rc' === WP_AUTO_UPDATE_CORE
|
||||||
) {
|
) {
|
||||||
|
|
|
@ -27,7 +27,7 @@ class WP_Site_Health_Auto_Updates {
|
||||||
*/
|
*/
|
||||||
public function run_tests() {
|
public function run_tests() {
|
||||||
$tests = array(
|
$tests = array(
|
||||||
$this->test_constants( 'WP_AUTO_UPDATE_CORE', array( true, 'minor' ) ),
|
$this->test_constants( 'WP_AUTO_UPDATE_CORE', array( true, 'beta', 'rc', 'minor' ) ),
|
||||||
$this->test_wp_version_check_attached(),
|
$this->test_wp_version_check_attached(),
|
||||||
$this->test_filters_automatic_updater_disabled(),
|
$this->test_filters_automatic_updater_disabled(),
|
||||||
$this->test_wp_automatic_updates_disabled(),
|
$this->test_wp_automatic_updates_disabled(),
|
||||||
|
|
|
@ -322,13 +322,17 @@ function core_auto_updates_settings() {
|
||||||
$upgrade_minor = get_site_option( 'auto_update_core_minor', true );
|
$upgrade_minor = get_site_option( 'auto_update_core_minor', true );
|
||||||
$upgrade_major = get_site_option( 'auto_update_core_major', false );
|
$upgrade_major = get_site_option( 'auto_update_core_major', false );
|
||||||
|
|
||||||
|
// WP_AUTO_UPDATE_CORE = true (all), 'beta', 'rc', 'minor', false.
|
||||||
if ( defined( 'WP_AUTO_UPDATE_CORE' ) ) {
|
if ( defined( 'WP_AUTO_UPDATE_CORE' ) ) {
|
||||||
if ( false === WP_AUTO_UPDATE_CORE ) {
|
if ( false === WP_AUTO_UPDATE_CORE ) {
|
||||||
// Defaults to turned off, unless a filter allows it.
|
// Defaults to turned off, unless a filter allows it.
|
||||||
$upgrade_dev = false;
|
$upgrade_dev = false;
|
||||||
$upgrade_minor = false;
|
$upgrade_minor = false;
|
||||||
$upgrade_major = false;
|
$upgrade_major = false;
|
||||||
} elseif ( true === WP_AUTO_UPDATE_CORE ) {
|
} elseif ( true === WP_AUTO_UPDATE_CORE
|
||||||
|
|| 'beta' === WP_AUTO_UPDATE_CORE
|
||||||
|
|| 'rc' === WP_AUTO_UPDATE_CORE
|
||||||
|
) {
|
||||||
// ALL updates for core.
|
// ALL updates for core.
|
||||||
$upgrade_dev = true;
|
$upgrade_dev = true;
|
||||||
$upgrade_minor = true;
|
$upgrade_minor = true;
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '5.6-beta1-49291';
|
$wp_version = '5.6-beta1-49292';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue