Skip to content
Snippets Groups Projects
Commit 0033ea1e authored by Erick Hitter's avatar Erick Hitter
Browse files

Remove additional query args that are interpreted by `WP_Query`

parent c883389a
No related branches found
No related tags found
No related merge requests found
...@@ -268,10 +268,15 @@ class Main { ...@@ -268,10 +268,15 @@ class Main {
$redirect = wp_unslash( $_SERVER['REQUEST_URI'] ); $redirect = wp_unslash( $_SERVER['REQUEST_URI'] );
// Remove arguments that could re-trigger this bulk action. // Remove arguments that could re-trigger this bulk action.
$action_keys = array( '_wp_http_referer', '_wpnonce', 'action', 'action2' ); $action_keys = array( '_wp_http_referer', '_wpnonce', 'action', 'action2', 'bulk_edit' );
$action_keys = array_merge( $action_keys, $extra_keys ); $action_keys = array_merge( $action_keys, $extra_keys );
$redirect = remove_query_arg( $action_keys, $redirect ); $redirect = remove_query_arg( $action_keys, $redirect );
// Also remove bulk action's arguments, to avoid a resubmit
$args = array( 'post', 'sticky', '_status' );
$args = array_merge( $args, self::get_supported_vars() );
$redirect = remove_query_arg( $args, $redirect );
// Add a flag for the admin notice. // Add a flag for the admin notice.
$redirect = add_query_arg( $return_key, $succeeded ? 1 : -1, $redirect ); $redirect = add_query_arg( $return_key, $succeeded ? 1 : -1, $redirect );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment