Deactivate Gutenberg plugin on update to 5.0.

Fixes #45123.


Built from https://develop.svn.wordpress.org/branches/5.0@43765


git-svn-id: http://core.svn.wordpress.org/branches/5.0@43594 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
mcsf 2018-10-19 10:51:39 +00:00
parent 93343de1bd
commit 326cd6af15
2 changed files with 24 additions and 2 deletions

View File

@ -614,6 +614,9 @@ function upgrade_all() {
if ( $wp_current_db_version < 37965 )
upgrade_460();
if ( $wp_current_db_version < 43764 )
upgrade_500();
maybe_disable_link_manager();
maybe_disable_automattic_widgets();
@ -1781,6 +1784,25 @@ function upgrade_460() {
}
}
/**
* Executes changes made in WordPress 5.0.0.
*
* @ignore
* @since 5.0.0
*
* @global int $wp_current_db_version Current database version.
*/
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;
}
deactivate_plugins( array( 'gutenberg/gutenberg.php' ), true );
}
}
/**
* Executes network-level upgrade routines.
*

View File

@ -4,14 +4,14 @@
*
* @global string $wp_version
*/
$wp_version = '5.0-alpha-43764';
$wp_version = '5.0-alpha-43765';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
*
* @global int $wp_db_version
*/
$wp_db_version = 38590;
$wp_db_version = 43764;
/**
* Holds the TinyMCE version