Do not save the last visited tab on the multisite Network Themes page and Site Themes tab. These are poor UX, see #18810 for plugins. Entering these screens will always default to 'all' themes view. see #20103.
git-svn-id: https://develop.svn.wordpress.org/trunk@20022 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
696f52729e
commit
21630b2828
|
@ -15,14 +15,9 @@ class WP_MS_Themes_List_Table extends WP_List_Table {
|
||||||
function __construct() {
|
function __construct() {
|
||||||
global $status, $page;
|
global $status, $page;
|
||||||
|
|
||||||
$default_status = get_user_option( 'themes_last_view' );
|
$status = isset( $_REQUEST['theme_status'] ) ? $_REQUEST['theme_status'] : 'all';
|
||||||
if ( empty( $default_status ) )
|
|
||||||
$default_status = 'all';
|
|
||||||
$status = isset( $_REQUEST['theme_status'] ) ? $_REQUEST['theme_status'] : $default_status;
|
|
||||||
if ( !in_array( $status, array( 'all', 'enabled', 'disabled', 'upgrade', 'search' ) ) )
|
if ( !in_array( $status, array( 'all', 'enabled', 'disabled', 'upgrade', 'search' ) ) )
|
||||||
$status = 'all';
|
$status = 'all';
|
||||||
if ( $status != $default_status && 'search' != $status )
|
|
||||||
update_user_meta( get_current_user_id(), 'themes_last_view', $status );
|
|
||||||
|
|
||||||
$page = $this->get_pagenum();
|
$page = $this->get_pagenum();
|
||||||
|
|
||||||
|
|
|
@ -459,7 +459,7 @@ function upgrade_all() {
|
||||||
if ( $wp_current_db_version < 19389 )
|
if ( $wp_current_db_version < 19389 )
|
||||||
upgrade_330();
|
upgrade_330();
|
||||||
|
|
||||||
if ( $wp_current_db_version < 19799 )
|
if ( $wp_current_db_version < 20022 )
|
||||||
upgrade_340();
|
upgrade_340();
|
||||||
|
|
||||||
maybe_disable_automattic_widgets();
|
maybe_disable_automattic_widgets();
|
||||||
|
@ -1235,6 +1235,10 @@ function upgrade_340() {
|
||||||
$wpdb->query("ALTER TABLE $wpdb->comments DROP INDEX comment_approved");
|
$wpdb->query("ALTER TABLE $wpdb->comments DROP INDEX comment_approved");
|
||||||
$wpdb->show_errors();
|
$wpdb->show_errors();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( $wp_current_db_version < 20022 && is_main_site() && ! defined( 'DO_NOT_UPGRADE_GLOBAL_TABLES' ) ) {
|
||||||
|
$wpdb->query( "DELETE FROM $wpdb->usermeta WHERE meta_key = 'themes_last_view'" );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -11,7 +11,7 @@ $wp_version = '3.4-alpha-20014';
|
||||||
*
|
*
|
||||||
* @global int $wp_db_version
|
* @global int $wp_db_version
|
||||||
*/
|
*/
|
||||||
$wp_db_version = 19863;
|
$wp_db_version = 20022;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the TinyMCE version
|
* Holds the TinyMCE version
|
||||||
|
|
Loading…
Reference in New Issue