]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-admin/includes/class-wp-ms-users-list-table.php
WordPress 4.6.3
[autoinstalls/wordpress.git] / wp-admin / includes / class-wp-ms-users-list-table.php
index 9062d9f084959541ffe0dd1f5cd1c506185bc826..da00131bcd488c5662d20ff6ac47caf2e008ad63 100644 (file)
@@ -81,7 +81,12 @@ class WP_MS_Users_List_Table extends WP_List_Table {
                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 );
@@ -167,7 +172,7 @@ class WP_MS_Users_List_Table extends WP_List_Table {
                        'blogs'      => __( 'Sites' )
                );
                /**
-                * Filter the columns displayed in the Network Admin Users list table.
+                * Filters the columns displayed in the Network Admin Users list table.
                 *
                 * @since MU
                 *
@@ -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
@@ -346,7 +351,7 @@ class WP_MS_Users_List_Table extends WP_List_Table {
                        $actions['view'] = '<a class="' . $class . '" href="' . esc_url( get_home_url( $val->userblog_id ) ) . '">' . __( 'View' ) . '</a>';
 
                        /**
-                        * Filter the action links displayed next the sites a user belongs to
+                        * Filters the action links displayed next the sites a user belongs to
                         * in the Network Admin Users list table.
                         *
                         * @since 3.1.0
@@ -441,7 +446,7 @@ class WP_MS_Users_List_Table extends WP_List_Table {
                }
 
                /**
-                * Filter the action links displayed under each user in the Network Admin Users list table.
+                * Filters the action links displayed under each user in the Network Admin Users list table.
                 *
                 * @since 3.2.0
                 *