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

Improve how requests are intercepted, and capture another special case for deleting everything

parent 5ac9be8b
No related branches found
No related tags found
No related merge requests found
......@@ -63,7 +63,15 @@ class Main {
* Determine if current request is a bulk edit
*/
private static function should_intercept_request() {
return isset( $_REQUEST['action'] ) || isset( $_REQUEST['action2'] ) || isset( $_REQUEST['delete_all'] );
if ( isset( $_REQUEST['delete_all'] ) || isset( $_REQUEST['delete_all2'] ) ) {
return true;
} elseif ( isset( $_REQUEST['action'] ) && '-1' !== $_REQUEST['action'] ) {
return true;
} elseif ( isset( $_REQUEST['action2'] ) && '-1' !== $_REQUEST['action2'] ) {
return true;
}
return false;
}
/**
......@@ -74,7 +82,7 @@ class Main {
$vars->user_id = get_current_user_id();
if ( isset( $_REQUEST['delete_all'] ) ) {
if ( isset( $_REQUEST['delete_all'] ) || isset( $_REQUEST['delete_all2'] ) ) {
$vars->action = 'delete_all';
$vars->post_status = $_REQUEST['post_status'];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment