Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unset mode query variable before checking base request #8056

Open
wants to merge 1 commit into
base: trunk
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions src/wp-admin/includes/class-wp-posts-list-table.php
Original file line number Diff line number Diff line change
Expand Up @@ -233,18 +233,23 @@
* @return bool Whether the current view is the "All" view.
*/
protected function is_base_request() {
$vars = $_GET;
unset( $vars['paged'] );
$vars = array_diff_key( $_GET, array_flip( array(

Check failure on line 236 in src/wp-admin/includes/class-wp-posts-list-table.php

View workflow job for this annotation

GitHub Actions / PHP coding standards / Run coding standards checks

Opening parenthesis of a multi-line function call must be the last content on the line

Check failure on line 236 in src/wp-admin/includes/class-wp-posts-list-table.php

View workflow job for this annotation

GitHub Actions / PHP coding standards / Run coding standards checks

Only one argument is allowed per line in a multi-line function call

Check failure on line 236 in src/wp-admin/includes/class-wp-posts-list-table.php

View workflow job for this annotation

GitHub Actions / PHP coding standards / Run coding standards checks

Opening parenthesis of a multi-line function call must be the last content on the line
'order',
'orderby',
'paged',
'mode',
) ) );

Check failure on line 241 in src/wp-admin/includes/class-wp-posts-list-table.php

View workflow job for this annotation

GitHub Actions / PHP coding standards / Run coding standards checks

Closing parenthesis of a multi-line function call must be on a line by itself

Check failure on line 241 in src/wp-admin/includes/class-wp-posts-list-table.php

View workflow job for this annotation

GitHub Actions / PHP coding standards / Run coding standards checks

Closing parenthesis of a multi-line function call must be on a line by itself

if ( empty( $vars ) ) {
return true;
} elseif ( 1 === count( $vars ) && ! empty( $vars['post_type'] ) ) {
}

if ( 1 === count( $vars ) && ! empty( $vars['post_type'] ) ) {
return $this->screen->post_type === $vars['post_type'];
}

return 1 === count( $vars ) && ! empty( $vars['mode'] );
return false;
}

/**
* Creates a link to edit.php with params.
*
Expand Down
Loading