Users: Stop WP_List_Table notices from persisting on pagination navigation.

Adds the keyboard navigation query vars to `wp_removable_query_args()` and passes the results of said function to remove_query_var() inside the WP_List_Table pagination method.

Props EFAREM for the initial patch.
Fixes #35620.

git-svn-id: https://develop.svn.wordpress.org/trunk@37663 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Rachel Baker 2016-06-09 01:55:40 +00:00
parent 8de500d493
commit 0c990ffb73
2 changed files with 4 additions and 1 deletions

View File

@ -763,10 +763,11 @@ class WP_List_Table {
$output = '<span class="displaying-num">' . sprintf( _n( '%s item', '%s items', $total_items ), number_format_i18n( $total_items ) ) . '</span>';
$current = $this->get_pagenum();
$removable_query_args = wp_removable_query_args();
$current_url = set_url_scheme( 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] );
$current_url = remove_query_arg( array( 'hotkeys_highlight_last', 'hotkeys_highlight_first' ), $current_url );
$current_url = remove_query_arg( $removable_query_args, $current_url );
$page_links = array();

View File

@ -865,6 +865,8 @@ function wp_removable_query_args() {
'disabled',
'enabled',
'error',
'hotkeys_highlight_first',
'hotkeys_highlight_last',
'locked',
'message',
'same',