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:
parent
8de500d493
commit
0c990ffb73
|
@ -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>';
|
$output = '<span class="displaying-num">' . sprintf( _n( '%s item', '%s items', $total_items ), number_format_i18n( $total_items ) ) . '</span>';
|
||||||
|
|
||||||
$current = $this->get_pagenum();
|
$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 = 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();
|
$page_links = array();
|
||||||
|
|
||||||
|
|
|
@ -865,6 +865,8 @@ function wp_removable_query_args() {
|
||||||
'disabled',
|
'disabled',
|
||||||
'enabled',
|
'enabled',
|
||||||
'error',
|
'error',
|
||||||
|
'hotkeys_highlight_first',
|
||||||
|
'hotkeys_highlight_last',
|
||||||
'locked',
|
'locked',
|
||||||
'message',
|
'message',
|
||||||
'same',
|
'same',
|
||||||
|
|
Loading…
Reference in New Issue