From 04b8e97febc9941e01b8ccd3cb83b7dc9274244c Mon Sep 17 00:00:00 2001 From: Ahmed Sayeed Wasif Date: Mon, 18 Mar 2024 10:21:41 +0600 Subject: [PATCH] Prevent enabling debug mode on local env --- 000-debug/debug-mode.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/000-debug/debug-mode.php b/000-debug/debug-mode.php index 2b0486a7fa..a92af10324 100644 --- a/000-debug/debug-mode.php +++ b/000-debug/debug-mode.php @@ -40,9 +40,8 @@ function is_debug_mode_enabled() { $is_nocache = isset( $_COOKIE['vip-go-cb'] ) && '1' === $_COOKIE['vip-go-cb']; // phpcs:ignore WordPressVIPMinimum.Variables.RestrictedVariables.cache_constraints___COOKIE $is_debug = isset( $_COOKIE['a8c-debug'] ) && '1' === $_COOKIE['a8c-debug']; // phpcs:ignore WordPressVIPMinimum.Variables.RestrictedVariables.cache_constraints___COOKIE $is_proxied = \is_proxied_request(); - $is_local = function_exists( 'is_local_env' ) && \is_local_env(); - if ( ( $is_nocache && $is_debug && $is_proxied ) || $is_local ) { + if ( $is_nocache && $is_debug && $is_proxied ) { return true; }