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

Helpers make this easier to follow

parent 06cc1002
No related branches found
No related tags found
No related merge requests found
...@@ -15,10 +15,12 @@ class Main { ...@@ -15,10 +15,12 @@ class Main {
*/ */
public static function intercept() { public static function intercept() {
// Nothing to do // Nothing to do
if ( ! isset( $_REQUEST['action'] ) && ! isset( $_REQUEST['action2'] ) && ! isset( $_REQUEST['delete_all'] ) ) { if ( ! self::should_intercept_request() ) {
return; return;
} }
// TODO: nonce/referrer checks
// Parse request to determine what to do // Parse request to determine what to do
$vars = self::capture_vars(); $vars = self::capture_vars();
...@@ -53,6 +55,13 @@ class Main { ...@@ -53,6 +55,13 @@ 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'] );
}
/** /**
* Capture relevant variables * Capture relevant variables
*/ */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment