Introduce upgrade_330() to clear usermeta keys show_admin_bar_admin and plugins_last_view. fixes #18811.

git-svn-id: http://svn.automattic.com/wordpress/trunk@19061 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
nacin 2011-10-25 05:48:09 +00:00
parent 6f9612f45c
commit 66125a116f
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