From ce2b5be7e2b0176ef135e4c21014659a89a6d866 Mon Sep 17 00:00:00 2001 From: Erick Hitter <services@ethitter.com> Date: Tue, 28 Feb 2017 17:24:47 -0800 Subject: [PATCH] Log when incorrect actions are encountered Something is really wrong if this happens. Means the `intercept()` method is loaded on the wrong screen. --- includes/class-main.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/includes/class-main.php b/includes/class-main.php index c56dd61..7d594e8 100644 --- a/includes/class-main.php +++ b/includes/class-main.php @@ -48,8 +48,11 @@ class Main { return; break; - // How did you get here? + // Should only arrive here if loaded on the wrong admin screen default : + error_log( var_export( get_current_screen(), true ) ); + error_log( var_export( wp_debug_backtrace_summary( __CLASS__, null, false ), true ) ); + return; break; } -- GitLab