Skip to content

Commit

Permalink
fix current screen not set when editing posts
Browse files Browse the repository at this point in the history
  • Loading branch information
Sanna Nygard committed Dec 9, 2019
1 parent 3f094b3 commit 909fb44
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions multilingual-options-page.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,12 @@ public function acf_location_rules_values($choices) {

public function acf_location_rules_match($match, $rule, $options) {
$selected_options_page = $rule['value'];
$current_screen = get_current_screen();

if (empty($current_screen)) {
return;
}

$current_screen_id = get_current_screen()->id;

if ($rule['operator'] == "==") {
Expand Down

0 comments on commit 909fb44

Please sign in to comment.