WordPress.org

Make WordPress Core

Changeset 36562


Ignore:
Timestamp:
02/17/2016 09:59:51 PM (5 years ago)
Author:
jeremyfelt
Message:

Multisite: Make view mode sticky for network users and sites list tables.

Fixes #34365.

Location:
trunk/src/wp-admin/includes
Files:
2 edited

Legend:

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

    r36416 r36562  
    7070        $current_site = get_current_site();
    7171
    72         $mode = ( empty( $_REQUEST['mode'] ) ) ? 'list' : $_REQUEST['mode'];
     72        if ( ! empty( $_REQUEST['mode'] ) ) {
     73            $mode = $_REQUEST['mode'] === 'excerpt' ? 'excerpt' : 'list';
     74            set_user_setting ( 'sites_list_mode', $mode );
     75        } else {
     76            $mode = get_user_setting ( 'sites_list_mode', 'list' );
     77        }
    7378
    7479        $per_page = $this->get_items_per_page( 'sites_network_per_page' );
  • trunk/src/wp-admin/includes/class-wp-ms-users-list-table.php

    r36416 r36562  
    8282            $args['order'] = $_REQUEST['order'];
    8383
    84         $mode = empty( $_REQUEST['mode'] ) ? 'list' : $_REQUEST['mode'];
     84        if ( ! empty( $_REQUEST['mode'] ) ) {
     85            $mode = $_REQUEST['mode'] === 'excerpt' ? 'excerpt' : 'list';
     86            set_user_setting ( 'network_users_list_mode', $mode );
     87        } else {
     88            $mode = get_user_setting ( 'network_users_list_mode', 'list' );
     89        }
    8590
    8691        /** This filter is documented in wp-admin/includes/class-wp-users-list-table.php */
Note: See TracChangeset for help on using the changeset viewer.