From 0033ea1e31513477a3d4ff2b827810a13652a88b Mon Sep 17 00:00:00 2001 From: Erick Hitter <git-contrib@ethitter.com> Date: Thu, 14 Sep 2017 15:52:51 -0700 Subject: [PATCH] Remove additional query args that are interpreted by `WP_Query` --- includes/class-main.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/includes/class-main.php b/includes/class-main.php index f29b337..0c88974 100644 --- a/includes/class-main.php +++ b/includes/class-main.php @@ -268,10 +268,15 @@ class Main { $redirect = wp_unslash( $_SERVER['REQUEST_URI'] ); // 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 ); $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. $redirect = add_query_arg( $return_key, $succeeded ? 1 : -1, $redirect ); -- GitLab