Make WordPress Core

Ticket #34415: 34415.diff

File 34415.diff, 978 bytes (added by wonderboymusic, 9 years ago)
  • src/wp-admin/includes/update-core.php

     
    10721072        // Remove any Genericons example.html's from the filesystem
    10731073        _upgrade_422_remove_genericons();
    10741074
     1075        // Remove the REST API plugin if its version is Beta 4 or lower
     1076        _upgrade_440_force_deactivate_incompatible_plugins();
     1077
    10751078        // Upgrade DB with separate request
    10761079        /** This filter is documented in wp-admin/includes/update-core.php */
    10771080        apply_filters( 'update_feedback', __( 'Upgrading database…' ) );
     
    12861289
    12871290        return $files;
    12881291}
     1292
     1293/**
     1294 * @ignore
     1295 * @since 4.4.0
     1296 */
     1297function _upgrade_440_force_deactivate_incompatible_plugins() {
     1298        if ( defined( 'REST_API_VERSION' ) && version_compare( REST_API_VERSION, '2.0-beta4', '<=' ) ) {
     1299                deactivate_plugins( array( 'rest-api/plugin.php' ), true );
     1300        }
     1301}