Skip to content

Commit 07d4914

Browse files
committed
gppa-wpml-current-language-choices.php: Automatically filter posts by current WPML language.
1 parent e62f3ad commit 07d4914

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

gp-populate-anything/gppa-wpml-current-language-choices.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ function hb_wpml_limit_gppa_choices_to_current_language( $choices, $field, $obje
3333
return $choices;
3434
}
3535

36-
$filtered_choices = [];
36+
$filtered_choices = array();
3737

3838
foreach ( $choices as $index => $choice ) {
3939
$post_id = 0;
@@ -64,10 +64,10 @@ function hb_wpml_limit_gppa_choices_to_current_language( $choices, $field, $obje
6464
$choice_lang = apply_filters(
6565
'wpml_element_language_code',
6666
null,
67-
[
67+
array(
6868
'element_id' => $post_id,
6969
'element_type' => $element_type,
70-
]
70+
)
7171
);
7272

7373
// If WPML knows the language and it does not match the current language, skip this choice.

0 commit comments

Comments
 (0)