WordPress 4.5
[autoinstalls/wordpress.git] / wp-admin / includes / class-wp-ms-users-list-table.php
index 9062d9f084959541ffe0dd1f5cd1c506185bc826..380e4a02d3a43ab1442256973b5a1ebeb9b90cc6 100644 (file)
@@ -81,7 +81,12 @@ class WP_MS_Users_List_Table extends WP_List_Table {
                if ( isset( $_REQUEST['order'] ) )
                        $args['order'] = $_REQUEST['order'];
 
                if ( isset( $_REQUEST['order'] ) )
                        $args['order'] = $_REQUEST['order'];
 
-               $mode = empty( $_REQUEST['mode'] ) ? 'list' : $_REQUEST['mode'];
+               if ( ! empty( $_REQUEST['mode'] ) ) {
+                       $mode = $_REQUEST['mode'] === 'excerpt' ? 'excerpt' : 'list';
+                       set_user_setting( 'network_users_list_mode', $mode );
+               } else {
+                       $mode = get_user_setting( 'network_users_list_mode', 'list' );
+               }
 
                /** This filter is documented in wp-admin/includes/class-wp-users-list-table.php */
                $args = apply_filters( 'users_list_table_query_args', $args );
 
                /** This filter is documented in wp-admin/includes/class-wp-users-list-table.php */
                $args = apply_filters( 'users_list_table_query_args', $args );
@@ -304,7 +309,7 @@ class WP_MS_Users_List_Table extends WP_List_Table {
        }
 
        /**
        }
 
        /**
-        * Handles the blogs/sites column output.
+        * Handles the sites column output.
         *
         * @since 4.3.0
         * @access public
         *
         * @since 4.3.0
         * @access public