From f93008fbaf0bf1973f02c1ce3dee71db65880705 Mon Sep 17 00:00:00 2001 From: wpalani Date: Sun, 3 Nov 2024 16:33:52 -0700 Subject: [PATCH] Redirect interceptor --- includes/Application.php | 1 + includes/ExternalRedirectInterceptor.php | 38 ++++++++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 includes/ExternalRedirectInterceptor.php diff --git a/includes/Application.php b/includes/Application.php index 47754709d..05aecab97 100644 --- a/includes/Application.php +++ b/includes/Application.php @@ -71,6 +71,7 @@ public function __construct( Container $container ) { if ( Permissions::is_authorized_admin() || Permissions::rest_is_authorized_admin() ) { new RestAPI(); new WP_Admin(); + new ExternalRedirectInterceptor(); } if ( Permissions::is_authorized_admin() ) { diff --git a/includes/ExternalRedirectInterceptor.php b/includes/ExternalRedirectInterceptor.php new file mode 100644 index 000000000..10c052ff9 --- /dev/null +++ b/includes/ExternalRedirectInterceptor.php @@ -0,0 +1,38 @@ +