Skip to content

Commit

Permalink
bail early if get_current_screen() not defined
Browse files Browse the repository at this point in the history
  • Loading branch information
Sanna Nygard committed Feb 4, 2022
1 parent 909fb44 commit 08aaf77
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions multilingual-options-page.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down

0 comments on commit 08aaf77

Please sign in to comment.