From 96e4fffaa9b638fa969118c0135d571ff0258c6e Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Tue, 25 Oct 2011 05:48:09 +0000 Subject: [PATCH] Introduce upgrade_330() to clear usermeta keys show_admin_bar_admin and plugins_last_view. fixes #18811. git-svn-id: https://develop.svn.wordpress.org/trunk@19061 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/includes/upgrade.php | 21 +++++++++++++++++++-- wp-includes/version.php | 4 ++-- 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/wp-admin/includes/upgrade.php b/wp-admin/includes/upgrade.php index 81646142b6..225793908d 100644 --- a/wp-admin/includes/upgrade.php +++ b/wp-admin/includes/upgrade.php @@ -451,8 +451,8 @@ function upgrade_all() { if ( $wp_current_db_version < 15260 ) upgrade_300(); - if ( $wp_current_db_version < 11548 ) - upgrade_old_widgets_order_array(); + if ( $wp_current_db_version < 19061 ) + upgrade_330(); maybe_disable_automattic_widgets(); @@ -1196,6 +1196,23 @@ 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 * diff --git a/wp-includes/version.php b/wp-includes/version.php index 67d7d4cda7..5ae5bd2fe8 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,14 +4,14 @@ * * @global string $wp_version */ -$wp_version = '3.3-beta2-19055'; +$wp_version = '3.3-beta2-19061'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * * @global int $wp_db_version */ -$wp_db_version = 18715; +$wp_db_version = 19061; /** * Holds the TinyMCE version