Skip to content

Commit 2934b66

Browse files
authored
Merge pull request #78 from k1sul1/patch-7
Wrap in exists check
2 parents 0efafcf + 910a4b6 commit 2934b66

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

classes/class-wplf-polylang.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,11 @@ public function save_success_message( $message ) {
8787
}
8888

8989
public function ajax_object( $array ) {
90-
$array['lang'] = pll_current_language();
90+
if ( function_exists( 'pll_current_language' ) ) {
91+
$array['lang'] = pll_current_language();
92+
} else {
93+
$array['lang'] = null;
94+
}
9195
return $array;
9296
}
9397

0 commit comments

Comments
 (0)