Install/upgrade: Remove Gutenberg plugin deactivation from upgrade process.

The Gutenberg plugin will not be deactivated on sites upgrading to WordPress 5.1. This deprecates the `upgrade_500_was_gutenberg_active` option and the `upgrade_500()` function as they are no longer required.

Props peterwilsoncc.
Fixes #46029.



git-svn-id: https://develop.svn.wordpress.org/trunk@44732 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Peter Wilson 2019-02-08 00:15:54 +00:00
parent d2f41560d3
commit ef74cf5c56
2 changed files with 13 additions and 19 deletions

View File

@ -811,8 +811,8 @@ function upgrade_all() {
upgrade_460();
}
if ( $wp_current_db_version < 43764 ) {
upgrade_500();
if ( $wp_current_db_version < 44719 ) {
upgrade_510();
}
maybe_disable_link_manager();
@ -2097,25 +2097,19 @@ function upgrade_460() {
*
* @ignore
* @since 5.0.0
*
* @global int $wp_current_db_version Current database version.
* @deprecated 5.1.0
*/
function upgrade_500() {
global $wp_current_db_version;
if ( $wp_current_db_version < 43764 ) {
// Allow bypassing Gutenberg plugin deactivation.
if ( defined( 'GUTENBERG_USE_PLUGIN' ) && GUTENBERG_USE_PLUGIN ) {
return;
}
}
$was_active = is_plugin_active( 'gutenberg/gutenberg.php' );
if ( $was_active ) {
// FIXME: Leave until 501 or 510 to clean up.
update_site_option( 'upgrade_500_was_gutenberg_active', '1' );
}
deactivate_plugins( array( 'gutenberg/gutenberg.php' ), true );
}
/**
* Executes changes made in WordPress 5.1.0.
*
* @ignore
* @since 5.1.0
*/
function upgrade_510() {
delete_site_option( 'upgrade_500_was_gutenberg_active' );
}
/**

View File

@ -20,7 +20,7 @@ $wp_version = '5.1-beta3-44721-src';
*
* @global int $wp_db_version
*/
$wp_db_version = 44467;
$wp_db_version = 44719;
/**
* Holds the TinyMCE version