PluginProbe
VikBooking Hotel Booking Engine & PMS / 1.8.16
VikBooking Hotel Booking Engine & PMS v1.8.16
1.8.16 1.8.15 1.8.14 1.8.13 1.8.12 1.8.11 1.8.10 1.8.9 1.8.6 1.8.7 1.8.8 trunk 1.6.0 1.6.1 1.6.2 1.6.3 1.6.4 1.6.5 1.6.6 1.6.7 1.6.8 1.6.9 1.7.0 1.7.1 1.7.2 All 37 releases
← All changes | libraries/adapter/config/config.php +14 -0 1.6.5 → 1.8.16 View file →
@@ -135,8 +135,22 @@
135 135
136 136 case 'languages.admin':
137 137 case 'languages.site':
138 138 $lang = get_option('WPLANG');
139 +
140 + if (!$lang)
141 + {
142 + /**
143 + * Attempt to load the default language from WPML configuration.
144 + *
145 + * @since 10.1.54
146 + */
147 + $activeLanguages = apply_filters('wpml_active_languages', []);
148 + $defaultLanguage = apply_filters('wpml_default_language', '');
149 + // convert language (en) into an extended locale (en_US)
150 + $lang = $activeLanguages[$defaultLanguage]['default_locale'] ?? null;
151 + }
152 +
139 153 return str_replace('_', '-', $lang ? $lang : 'en-US');
140 154 }
141 155
142 156 return get_option($key, $def);