diff --git a/wp-admin/includes/upgrade.php b/wp-admin/includes/upgrade.php index f8b871db49..82a6530e2c 100644 --- a/wp-admin/includes/upgrade.php +++ b/wp-admin/includes/upgrade.php @@ -793,6 +793,10 @@ function upgrade_all() { upgrade_460(); } + if ( $wp_current_db_version < 43764 ) { + upgrade_500(); + } + maybe_disable_link_manager(); maybe_disable_automattic_widgets(); @@ -2069,6 +2073,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. * diff --git a/wp-includes/version.php b/wp-includes/version.php index 2b6f1a912f..cc17b085b3 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,14 +13,14 @@ * * @global string $wp_version */ -$wp_version = '5.1-alpha-44124'; +$wp_version = '5.1-alpha-44125'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * * @global int $wp_db_version */ -$wp_db_version = 42836; +$wp_db_version = 43764; /** * Holds the TinyMCE version