From d075313f5b7ab1b64f33b788b469562a5dca5de4 Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Sat, 19 Sep 2015 18:16:31 +0000 Subject: [PATCH] Post List Table: 'All' view should be selected when appropriate for paged responses. Props kraftbj, wonderboymusic. Fixes #33923. git-svn-id: https://develop.svn.wordpress.org/trunk@34331 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/class-wp-posts-list-table.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/wp-admin/includes/class-wp-posts-list-table.php b/src/wp-admin/includes/class-wp-posts-list-table.php index a845c4c8a4..594df3d19f 100644 --- a/src/wp-admin/includes/class-wp-posts-list-table.php +++ b/src/wp-admin/includes/class-wp-posts-list-table.php @@ -200,13 +200,16 @@ class WP_Posts_List_Table extends WP_List_Table { * @return bool Whether the current view is the "All" view. */ protected function is_base_request() { - if ( empty( $_GET ) ) { + $vars = $_GET; + unset( $vars['paged'] ); + + if ( empty( $vars ) ) { return true; - } elseif ( 1 === count( $_GET ) && ! empty( $_GET['post_type'] ) ) { - return $this->screen->post_type === $_GET['post_type']; + } elseif ( 1 === count( $vars ) && ! empty( $vars['post_type'] ) ) { + return $this->screen->post_type === $vars['post_type']; } - return 1 === count( $_GET ) && ! empty( $_GET['mode'] ); + return 1 === count( $vars ) && ! empty( $vars['mode'] ); } /**