WordPress.org

Make WordPress Core

Ticket #18811: 18811.diff

File 18811.diff, 860 bytes (added by nacin, 7 years ago)
  • wp-admin/includes/upgrade.php

     
    451451        if ( $wp_current_db_version < 15260 )
    452452                upgrade_300();
    453453
     454        if ( $wp_current_db_version < 19999 )
     455                upgrade_330();
     456
    454457        maybe_disable_automattic_widgets();
    455458
    456459        update_option( 'db_version', $wp_db_version );
     
    11321135}
    11331136
    11341137/**
     1138 * Execute changes made in WordPress 3.3.
     1139 *
     1140 * @since 3.3.0
     1141 */
     1142function upgrade_330() {
     1143        global $wp_current_db_version, $wpdb;
     1144
     1145        if ( is_main_site() && ! defined( 'DO_NOT_UPGRADE_GLOBAL_TABLES' ) ) {
     1146                $wpdb->query( "DELETE FROM $wpdb->usermeta WHERE meta_key IN ('show_admin_bar_admin', 'plugins_last_view')" );
     1147        }
     1148}
     1149
     1150/**
    11351151 * Execute network level changes
    11361152 *
    11371153 * @since 3.0.0