Post List Table: 'All' view should be selected when appropriate for paged responses.

Props kraftbj, wonderboymusic.
Fixes #33923.

Built from https://develop.svn.wordpress.org/trunk@34331


git-svn-id: http://core.svn.wordpress.org/trunk@34295 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Scott Taylor 2015-09-19 18:17:24 +00:00
parent e4f350706c
commit 47fead7a38
2 changed files with 8 additions and 5 deletions

View File

@ -200,13 +200,16 @@ class WP_Posts_List_Table extends WP_List_Table {
* @return bool Whether the current view is the "All" view. * @return bool Whether the current view is the "All" view.
*/ */
protected function is_base_request() { protected function is_base_request() {
if ( empty( $_GET ) ) { $vars = $_GET;
unset( $vars['paged'] );
if ( empty( $vars ) ) {
return true; return true;
} elseif ( 1 === count( $_GET ) && ! empty( $_GET['post_type'] ) ) { } elseif ( 1 === count( $vars ) && ! empty( $vars['post_type'] ) ) {
return $this->screen->post_type === $_GET['post_type']; return $this->screen->post_type === $vars['post_type'];
} }
return 1 === count( $_GET ) && ! empty( $_GET['mode'] ); return 1 === count( $vars ) && ! empty( $vars['mode'] );
} }
/** /**

View File

@ -4,7 +4,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '4.4-alpha-34330'; $wp_version = '4.4-alpha-34331';
/** /**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.