From 08aaf77363a94b34747eab13851235b6966cca31 Mon Sep 17 00:00:00 2001 From: Sanna Nygard Date: Fri, 4 Feb 2022 10:52:10 +0200 Subject: [PATCH] bail early if get_current_screen() not defined --- multilingual-options-page.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/multilingual-options-page.php b/multilingual-options-page.php index fc77fce..c384414 100644 --- a/multilingual-options-page.php +++ b/multilingual-options-page.php @@ -78,6 +78,10 @@ public function acf_location_rules_values($choices) { } public function acf_location_rules_match($match, $rule, $options) { + if (!function_exists('get_current_screen')) { + return; + } + $selected_options_page = $rule['value']; $current_screen = get_current_screen();