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
This commit is contained in:
Andrew Nacin 2011-10-25 05:48:09 +00:00
parent fcf1696de4
commit 96e4fffaa9
2 changed files with 21 additions and 4 deletions

View File

@ -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
*

View File

@ -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