WordPress.org

Make WordPress Core

Changeset 19062


Ignore:
Timestamp:
10/25/2011 05:50:39 AM (7 years ago)
Author:
nacin
Message:

Merge upgrade_old_widgets_order_array() into upgrade_330(). see #18811, see #18821.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/upgrade.php

    r19061 r19062  
    11361136
    11371137/**
    1138  * Convert the old style widgets order array from 2.2.
     1138 * Execute changes made in WordPress 3.3.
    11391139 *
    11401140 * @since 3.3.0
    11411141 */
    1142 function upgrade_old_widgets_order_array() {
    1143     global $wp_registered_widgets, $sidebars_widgets;
     1142function upgrade_330() {
     1143    global $wp_current_db_version, $wpdb, $wp_registered_widgets, $sidebars_widgets;
     1144
     1145    if ( $wp_current_db_version < 19061 && 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    if ( $wp_current_db_version >= 11548 )
     1150        return;
    11441151
    11451152    $sidebars_widgets = get_option( 'sidebars_widgets', array() );
     
    11941201            $sidebars_widgets['array_version'] = 3;
    11951202            update_option( 'sidebars_widgets', $sidebars_widgets );
    1196     }
    1197 }
    1198 
    1199 /**
    1200  * Execute changes made in WordPress 3.3.
    1201  *
    1202  * @since 3.3.0
    1203  */
    1204 function upgrade_330() {
    1205     global $wp_current_db_version, $wpdb;
    1206 
    1207     if ( $wp_current_db_version < 11548 ) {
    1208        
    1209     }
    1210 
    1211     if ( $wp_current_db_version < 19061 && is_main_site() && ! defined( 'DO_NOT_UPGRADE_GLOBAL_TABLES' ) ) {
    1212         $wpdb->query( "DELETE FROM $wpdb->usermeta WHERE meta_key IN ('show_admin_bar_admin', 'plugins_last_view')" );
    12131203    }
    12141204}
Note: See TracChangeset for help on using the changeset viewer.