Make WordPress Core

Changeset 43765


Ignore:
Timestamp:
10/19/2018 10:50:20 AM (5 years ago)
Author:
mcsf
Message:

Deactivate Gutenberg plugin on update to 5.0.

Fixes #45123.

Location:
branches/5.0/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/5.0/src/wp-admin/includes/upgrade.php

    r43272 r43765  
    615615        upgrade_460();
    616616
     617    if ( $wp_current_db_version < 43764 )
     618        upgrade_500();
     619
    617620    maybe_disable_link_manager();
    618621
     
    17831786
    17841787/**
     1788 * Executes changes made in WordPress 5.0.0.
     1789 *
     1790 * @ignore
     1791 * @since 5.0.0
     1792 *
     1793 * @global int $wp_current_db_version Current database version.
     1794 */
     1795function upgrade_500() {
     1796    global $wp_current_db_version;
     1797    if ( $wp_current_db_version < 43764 ) {
     1798        // Allow bypassing Gutenberg plugin deactivation.
     1799        if ( defined( 'GUTENBERG_USE_PLUGIN' ) && GUTENBERG_USE_PLUGIN ) {
     1800            return;
     1801        }
     1802        deactivate_plugins( array( 'gutenberg/gutenberg.php' ), true );
     1803    }
     1804}
     1805
     1806/**
    17851807 * Executes network-level upgrade routines.
    17861808 *
  • branches/5.0/src/wp-includes/version.php

    r43676 r43765  
    1212 * @global int $wp_db_version
    1313 */
    14 $wp_db_version = 38590;
     14$wp_db_version = 43764;
    1515
    1616/**
Note: See TracChangeset for help on using the changeset viewer.