Make WordPress Core

Changeset 20022


Ignore:
Timestamp:
02/28/2012 08:13:21 PM (13 years ago)
Author:
nacin
Message:

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.

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/class-wp-ms-themes-list-table.php

    r19712 r20022  
    1616        global $status, $page;
    1717
    18         $default_status = get_user_option( 'themes_last_view' );
    19         if ( empty( $default_status ) )
    20             $default_status = 'all';
    21         $status = isset( $_REQUEST['theme_status'] ) ? $_REQUEST['theme_status'] : $default_status;
     18        $status = isset( $_REQUEST['theme_status'] ) ? $_REQUEST['theme_status'] : 'all';
    2219        if ( !in_array( $status, array( 'all', 'enabled', 'disabled', 'upgrade', 'search' ) ) )
    2320            $status = 'all';
    24         if ( $status != $default_status && 'search' != $status )
    25             update_user_meta( get_current_user_id(), 'themes_last_view', $status );
    2621
    2722        $page = $this->get_pagenum();
  • trunk/wp-admin/includes/upgrade.php

    r19935 r20022  
    460460        upgrade_330();
    461461
    462     if ( $wp_current_db_version < 19799 )
     462    if ( $wp_current_db_version < 20022 )
    463463        upgrade_340();
    464464
     
    12351235        $wpdb->query("ALTER TABLE $wpdb->comments DROP INDEX comment_approved");
    12361236        $wpdb->show_errors();
     1237    }
     1238
     1239    if ( $wp_current_db_version < 20022 && is_main_site() && ! defined( 'DO_NOT_UPGRADE_GLOBAL_TABLES' ) ) {
     1240        $wpdb->query( "DELETE FROM $wpdb->usermeta WHERE meta_key = 'themes_last_view'" );
    12371241    }
    12381242}
  • trunk/wp-includes/version.php

    r20014 r20022  
    1212 * @global int $wp_db_version
    1313 */
    14 $wp_db_version = 19863;
     14$wp_db_version = 20022;
    1515
    1616/**
Note: See TracChangeset for help on using the changeset viewer.