WordPress.org

Make WordPress Core


Ignore:
Timestamp:
10/20/2020 05:54:50 PM (4 months ago)
Author:
SergeyBiryukov
Message:

Upgrade/Install: Allow WordPress sites to opt-in to beta & RC releases.

The WP_AUTO_UPDATE_CORE constant now supports beta and rc values.

This makes it possible for sites to opt-in to updating to RC (or beta) releases without having to install a plugin, or run on a development version.

Props dd32, knutsp.
Fixes #51319.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/update.php

    r49108 r49245  
    135135    if ( is_array( $extra_stats ) ) {
    136136        $post_body = array_merge( $post_body, $extra_stats );
     137    }
     138
     139    // Allow for WP_AUTO_UPDATE_CORE to specify beta/RC releases.
     140    if ( defined( 'WP_AUTO_UPDATE_CORE' ) && in_array( WP_AUTO_UPDATE_CORE, array( 'beta', 'rc' ), true ) ) {
     141        $query['channel'] = WP_AUTO_UPDATE_CORE;
    137142    }
    138143
Note: See TracChangeset for help on using the changeset viewer.