WordPress.org

Make WordPress Core

Changeset 35582


Ignore:
Timestamp:
11/09/2015 01:21:29 AM (6 years ago)
Author:
dd32
Message:

Upgrade: Force disable the rest-api plugin on upgrade to 4.4 unless it's beta5+. Previous versions of the plugin were not configured correctly to gradefully degrade during update which would cause fatal errors.
Props wonderboymusic.
Fixes #34415

File:
1 edited

Legend:

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

    r35277 r35582  
    729729    'themes/twentyfourteen/' => '3.8',
    730730    'themes/twentyfifteen/'  => '4.1',
     731    'themes/twentysixteen/'  => '4.4',
    731732);
    732733
     
    10731074    _upgrade_422_remove_genericons();
    10741075
     1076    // Remove the REST API plugin if its version is Beta 4 or lower
     1077    _upgrade_440_force_deactivate_incompatible_plugins();
     1078
    10751079    // Upgrade DB with separate request
    10761080    /** This filter is documented in wp-admin/includes/update-core.php */
     
    12871291    return $files;
    12881292}
     1293
     1294/**
     1295 * @ignore
     1296 * @since 4.4.0
     1297 */
     1298function _upgrade_440_force_deactivate_incompatible_plugins() {
     1299    if ( defined( 'REST_API_VERSION' ) && version_compare( REST_API_VERSION, '2.0-beta4', '<=' ) ) {
     1300        deactivate_plugins( array( 'rest-api/plugin.php' ), true );
     1301    }
     1302}
Note: See TracChangeset for help on using the changeset viewer.