From f9d807d649db795ae55392cea9471ea6eb3b5e38 Mon Sep 17 00:00:00 2001 From: nacin Date: Tue, 25 Oct 2011 05:50:39 +0000 Subject: [PATCH] Merge upgrade_old_widgets_order_array() into upgrade_330(). see #18811, see #18821. git-svn-id: http://svn.automattic.com/wordpress/trunk@19062 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/upgrade.php | 30 ++++++++++-------------------- 1 file changed, 10 insertions(+), 20 deletions(-) diff --git a/wp-admin/includes/upgrade.php b/wp-admin/includes/upgrade.php index 225793908d..47deb1f80c 100644 --- a/wp-admin/includes/upgrade.php +++ b/wp-admin/includes/upgrade.php @@ -1135,12 +1135,19 @@ function upgrade_300() { } /** - * Convert the old style widgets order array from 2.2. + * Execute changes made in WordPress 3.3. * * @since 3.3.0 */ -function upgrade_old_widgets_order_array() { - global $wp_registered_widgets, $sidebars_widgets; +function upgrade_330() { + global $wp_current_db_version, $wpdb, $wp_registered_widgets, $sidebars_widgets; + + if ( $wp_current_db_version < 19061 && is_main_site() && ! defined( 'DO_NOT_UPGRADE_GLOBAL_TABLES' ) ) { + $wpdb->query( "DELETE FROM $wpdb->usermeta WHERE meta_key IN ('show_admin_bar_admin', 'plugins_last_view')" ); + } + + if ( $wp_current_db_version >= 11548 ) + return; $sidebars_widgets = get_option( 'sidebars_widgets', array() ); $_sidebars_widgets = array(); @@ -1196,23 +1203,6 @@ function upgrade_old_widgets_order_array() { } } -/** - * Execute changes made in WordPress 3.3. - * - * @since 3.3.0 - */ -function upgrade_330() { - global $wp_current_db_version, $wpdb; - - if ( $wp_current_db_version < 11548 ) { - - } - - if ( $wp_current_db_version < 19061 && is_main_site() && ! defined( 'DO_NOT_UPGRADE_GLOBAL_TABLES' ) ) { - $wpdb->query( "DELETE FROM $wpdb->usermeta WHERE meta_key IN ('show_admin_bar_admin', 'plugins_last_view')" ); - } -} - /** * Execute network level changes *