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
This commit is contained in:
parent
f4445d75c4
commit
d075313f5b
@ -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'] );
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user