From cba2601ae39189475082880f03fa2576f11e2474 Mon Sep 17 00:00:00 2001 From: Samuel Vanhove Date: Wed, 22 Nov 2017 15:11:11 -0500 Subject: [PATCH] CRM-21470 Add support for WordPress Polylang plugin --- CRM/Utils/System/WordPress.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CRM/Utils/System/WordPress.php b/CRM/Utils/System/WordPress.php index 75c5c9414b..14cef9ef51 100644 --- a/CRM/Utils/System/WordPress.php +++ b/CRM/Utils/System/WordPress.php @@ -380,8 +380,12 @@ class CRM_Utils_System_WordPress extends CRM_Utils_System_Base { * @inheritDoc */ public function getUFLocale() { + // Polylang plugin + if (function_exists('pll_current_language')) { + $language = pll_current_language(); + } // WPML plugin - if (defined('ICL_LANGUAGE_CODE')) { + elseif (defined('ICL_LANGUAGE_CODE')) { $language = ICL_LANGUAGE_CODE; } -- 2.25.1