PluginProbe ʕ •ᴥ•ʔ
EmbedPress – PDF Embedder, Embed PDF viewer, YouTube Videos, 3D FlipBook, Social feeds & more / 2.3.1
EmbedPress – PDF Embedder, Embed PDF viewer, YouTube Videos, 3D FlipBook, Social feeds & more v2.3.1
4.5.6 4.5.5 4.5.4 4.5.3 4.5.2 trunk 1.0.0 1.1.0 1.1.1 1.1.2 1.1.3 1.2.0 1.3.0 1.3.1 1.4.0 1.4.1 1.4.2 1.4.3 1.4.4 1.5.0 1.6.0 1.6.1 1.6.2 1.6.3 1.7.0 1.7.1 1.7.2 1.7.3 1.7.4 1.7.5 2.0.0 2.0.1 2.0.2 2.0.3 2.1.0 2.1.1 2.1.2 2.1.3 2.1.4 2.1.5 2.1.6 2.2.0 2.2.1 2.2.2 2.3.0 2.3.1 2.3.2 2.3.3 2.4.0 2.4.1 2.5.0 2.5.1 2.5.2 2.5.3 2.5.4 2.5.5 2.6.0 2.6.1 2.6.2 2.7.0 2.7.1 2.7.2 2.7.3 2.7.4 2.7.5 2.7.6 2.7.7 3.0.0 3.0.1 3.0.2 3.0.3 3.0.4 3.1.0 3.1.1 3.1.2 3.1.3 3.2.0 3.2.1 3.3.0 3.3.1 3.3.2 3.3.3 3.3.4 3.3.5 3.3.6 3.3.7 3.4.0 3.4.1 3.4.2 3.4.3 3.5.0 3.5.1 3.5.2 3.5.3 3.6.0 3.6.1 3.6.2 3.6.3 3.6.4 3.6.5 3.6.6 3.6.7 3.6.8 3.7.0 3.7.1 3.7.2 3.7.3 3.8.0 3.8.1 3.8.2 3.8.3 3.8.4 3.8.5 3.9.0 3.9.1 3.9.10 3.9.11 3.9.12 3.9.13 3.9.14 3.9.15 3.9.16 3.9.17 3.9.2 3.9.3 3.9.4 3.9.5 3.9.6 3.9.7 3.9.8 3.9.9 4.0.0 4.0.1 4.0.10 4.0.11 4.0.12 4.0.13 4.0.14 4.0.2 4.0.3 4.0.4 4.0.5 4.0.6 4.0.7 4.0.8 4.0.9 4.1.0 4.1.1 4.1.10 4.1.2 4.1.3 4.1.4 4.1.5 4.1.6 4.1.7 4.1.8 4.1.9 4.2.0 4.2.1 4.2.2 4.2.3 4.2.4 4.2.5 4.2.6 4.2.7 4.2.8 4.2.9 4.3.0 4.3.1 4.4.0 4.4.1 4.4.10 4.4.11 4.4.2 4.4.3 4.4.4 4.4.5 4.4.6 4.4.7 4.4.8 4.4.9 4.5.0 4.5.1
embedpress / EmbedPress / Ends / Back / Settings.php
embedpress / EmbedPress / Ends / Back Last commit date
Handler.php 7 years ago Settings.php 7 years ago index.html 7 years ago
Settings.php
605 lines
1 <?php
2
3 namespace EmbedPress\Ends\Back;
4
5 use EmbedPress\Compatibility;
6
7 (defined('ABSPATH') && defined('EMBEDPRESS_IS_LOADED')) or die("No direct script access allowed.");
8
9 /**
10 * Entity that handles the plugin's settings page.
11 *
12 * @package EmbedPress
13 * @subpackage EmbedPress/Ends/Back
14 * @author EmbedPress <help@embedpress.com>
15 * @copyright Copyright (C) 2018 EmbedPress. All rights reserved.
16 * @license GPLv2 or later
17 * @since 1.0.0
18 */
19 class Settings
20 {
21 /**
22 * This class namespace.
23 *
24 * @since 1.0.0
25 * @access private
26 * @static
27 *
28 * @var string $namespace
29 */
30 private static $namespace = '\\EmbedPress\\Ends\\Back\\Settings';
31
32 /**
33 * The plugin's unique identifier.
34 *
35 * @since 1.0.0
36 * @access private
37 * @static
38 *
39 * @var string $identifier
40 */
41 private static $identifier = "plg_embedpress";
42
43 /**
44 * Unique identifier to the plugin's admin settings section.
45 *
46 * @since 1.0.0
47 * @access private
48 * @static
49 *
50 * @var string $sectionAdminIdentifier
51 */
52 private static $sectionAdminIdentifier = "embedpress_options_admin";
53
54 /**
55 * Unique identifier to the plugin's general settings section.
56 *
57 * @since 1.0.0
58 * @access private
59 * @static
60 *
61 * @var string $sectionGroupIdentifier The name of the plugin.
62 */
63 private static $sectionGroupIdentifier = "embedpress";
64
65 /**
66 * Class constructor. This prevents the class being directly instantiated.
67 *
68 * @since 1.0.0
69 */
70 public function __construct()
71 {
72 }
73
74 /**
75 * This prevents the class being cloned.
76 *
77 * @since 1.0.0
78 */
79 public function __clone()
80 {
81 }
82
83 /**
84 * Method that adds an sub-item for EmbedPress to the WordPress Settings menu.
85 *
86 * @since 1.0.0
87 * @static
88 */
89 public static function registerMenuItem()
90 {
91 add_menu_page('EmbedPress Settings', 'EmbedPress', 'manage_options', 'embedpress',
92 [self::$namespace, 'renderForm'], null, 64);
93 }
94
95 /**
96 * Method that configures the EmbedPress settings page.
97 *
98 * @since 1.0.0
99 * @static
100 */
101 public static function registerActions()
102 {
103 $activeTab = isset($_GET['tab']) ? strtolower($_GET['tab']) : "";
104 if ($activeTab !== "embedpress") {
105 $action = "embedpress:{$activeTab}:settings:register";
106 } else {
107 $activeTab = "";
108 }
109
110 if ( ! empty($activeTab) && has_action($action)) {
111 do_action($action, [
112 'id' => self::$sectionAdminIdentifier,
113 'slug' => self::$identifier,
114 ]);
115 } else {
116 register_setting(self::$sectionGroupIdentifier, self::$sectionGroupIdentifier,
117 [self::$namespace, "validateForm"]);
118
119 add_settings_section(self::$sectionAdminIdentifier, '', null, self::$identifier);
120
121 $fieldMap = [];
122 if ( ! Compatibility::isWordPress5() || Compatibility::isClassicalEditorActive()) {
123 $fieldMap = [
124 'enablePluginInAdmin' => [
125 'label' => "Load previews in the admin editor",
126 'section' => "admin",
127 ],
128 'enablePluginInFront' => [
129 'label' => "Load previews in the frontend editor",
130 'section' => "admin",
131 ],
132 ];
133 }
134
135 $fieldMap['forceFacebookLanguage'] = [
136 'label' => "Facebook embed language",
137 'section' => "admin",
138 ];
139
140 foreach ($fieldMap as $fieldName => $field) {
141 add_settings_field($fieldName, $field['label'], [self::$namespace, "renderField_{$fieldName}"],
142 self::$identifier, self::${"section" . ucfirst($field['section']) . "Identifier"});
143 }
144 }
145 }
146
147 /**
148 * Returns true if the plugin is active
149 *
150 * @param string $plugin
151 *
152 * @return boolean
153 */
154 protected static function is_plugin_active($plugin)
155 {
156 return is_plugin_active("{$plugin}/{$plugin}.php");
157 }
158
159 /**
160 * Returns true if the plugin is installed
161 *
162 * @param string $plugin
163 *
164 * @return boolean
165 */
166 protected static function is_plugin_installed($plugin)
167 {
168 return file_exists(plugin_dir_path(EMBEDPRESS_ROOT) . "{$plugin}/{$plugin}.php");
169 }
170
171 /**
172 * Method that render the settings's form.
173 *
174 * @since 1.0.0
175 * @static
176 */
177 public static function renderForm()
178 {
179 // Add the color picker css file
180 wp_enqueue_style('wp-color-picker');
181 // Include our custom jQuery file with WordPress Color Picker dependency
182 wp_enqueue_script('ep-settings', EMBEDPRESS_URL_ASSETS . 'js/settings.js', ['wp-color-picker'],
183 EMBEDPRESS_VERSION, true);
184
185 $activeTab = isset($_GET['tab']) ? strtolower($_GET['tab']) : "";
186 $settingsFieldsIdentifier = ! empty($activeTab) ? "embedpress:{$activeTab}" : self::$sectionGroupIdentifier;
187 $settingsSectionsIdentifier = ! empty($activeTab) ? "embedpress:{$activeTab}" : self::$identifier;
188 ?>
189 <div id="embedpress-settings-wrapper">
190 <header>
191 <h1 class="pressshack-title">
192 <a href="//wordpress.org/plugins/embedpress" target="_blank" rel="noopener noreferrer"
193 title="EmbedPress">
194 EmbedPress
195 </a>
196 </h1>
197 </header>
198
199 <?php settings_errors(); ?>
200
201 <div>
202 <h2 class="nav-tab-wrapper">
203 <a href="?page=embedpress"
204 class="nav-tab<?php echo $activeTab === 'embedpress' || empty($activeTab) ? ' nav-tab-active' : ''; ?> ">
205 General settings
206 </a>
207
208 <?php do_action('embedpress:settings:render:tab', $activeTab); ?>
209
210 <a href="?page=embedpress&tab=addons"
211 class="nav-tab<?php echo $activeTab === 'addons' ? ' nav-tab-active' : ''; ?> ">
212 Add-ons
213 </a>
214 </h2>
215
216 <?php if ($activeTab !== 'addons') : ?>
217 <form action="options.php" method="POST" style="padding-bottom: 20px;">
218 <?php settings_fields($settingsFieldsIdentifier); ?>
219 <?php do_settings_sections($settingsSectionsIdentifier); ?>
220
221 <button type="submit" class="button button-primary">Save changes</button>
222 </form>
223 <?php endif; ?>
224
225 <?php if ($activeTab === 'addons') : ?>
226 <?php
227 $icons_base_path = plugins_url('embedpress') . '/assets/images/';
228
229 $addons = [
230 'embedpress-youtube' => [
231 'title' => __('The YouTube Add-on for EmbedPress', 'embedpress'),
232 'description' => __('Get more features for your YouTube embeds in WordPress.',
233 'embedpress'),
234 'available' => true,
235 'installed' => static::is_plugin_installed('embedpress-youtube'),
236 'active' => static::is_plugin_active('embedpress-youtube'),
237 ],
238 'embedpress-vimeo' => [
239 'title' => __('The Vimeo Add-on for EmbedPress', 'embedpress'),
240 'description' => __('Get more features for your Vimeo embeds in WordPress.', 'embedpress'),
241 'available' => true,
242 'installed' => static::is_plugin_installed('embedpress-vimeo'),
243 'active' => static::is_plugin_active('embedpress-vimeo'),
244 ],
245 'embedpress-wistia' => [
246 'title' => __('The Wistia Add-on for EmbedPress', 'embedpress'),
247 'description' => __('Get more features for your Wistia embeds in WordPress.', 'embedpress'),
248 'available' => true,
249 'installed' => static::is_plugin_installed('embedpress-wistia'),
250 'active' => static::is_plugin_active('embedpress-wistia'),
251 ],
252 ];
253
254 $args = [
255 'addons' => $addons,
256 'icons_base_path' => $icons_base_path,
257 'labels' => [
258 'active' => __('Active', 'publishpress'),
259 'installed' => __('Installed', 'publishpress'),
260 'get_pro_addons' => __('Get Pro Add-ons!', 'publishpress'),
261 'coming_soon' => __('Coming soon', 'publishpress'),
262 ],
263 ];
264
265 ?>
266 <div class="ep-module-settings">
267 <ul class="ep-block-addons-items">
268 <?php foreach ($addons as $name => $addon): ?>
269 <li class="ep-block-addons-item ">
270 <img src="<?php echo $icons_base_path . $name; ?>.jpg">
271 <h3><?php echo $addon['title']; ?></h3>
272 <p><?php echo $addon['description']; ?></p>
273
274 <?php if ($addon['available']): ?>
275 <?php if ($addon['installed']): ?>
276 <?php if ($addon['active']): ?>
277 <div>
278 <span class="dashicons dashicons-yes"></span><span><?php echo __('Active',
279 'embedpress'); ?></span>
280 </div>
281 <?php else: ?>
282 <div>
283 <span><?php echo __('Installed', 'embedpress'); ?></span>
284 </div>
285 <?php endif; ?>
286 <?php else: ?>
287 <a href="https://embedpress.com/embedpress-addons/"
288 class="button button-primary">
289 <span class="dashicons dashicons-cart"></span> <?php echo __('Get Pro Add-ons!',
290 'embedpress'); ?>
291 </a>
292 <?php endif; ?>
293 <?php else: ?>
294 <div><?php echo __('Coming soon', 'embedpress'); ?></div>
295 <?php endif; ?>
296 </li>
297 <?php endforeach; ?>
298 </ul>
299 </div>
300 <?php endif; ?>
301 </div>
302
303 <footer>
304 <p>
305 <a href="//wordpress.org/support/plugin/embedpress/reviews/#new-post" target="_blank"
306 rel="noopener noreferrer">If you like <strong>EmbedPress</strong> please leave us a <span
307 class="dashicons dashicons-star-filled"></span><span
308 class="dashicons dashicons-star-filled"></span><span
309 class="dashicons dashicons-star-filled"></span><span
310 class="dashicons dashicons-star-filled"></span><span
311 class="dashicons dashicons-star-filled"></span> rating. Thank you!</a>
312 </p>
313 <hr>
314 <nav>
315 <ul>
316 <li>
317 <a href="//embedpress.com" target="_blank" rel="noopener noreferrer"
318 title="About EmbedPress">About</a>
319 </li>
320 <li>
321 <a href="//embedpress.com/docs/sources-support" target="_blank" rel="noopener noreferrer"
322 title="List of supported sources by EmbedPress">Supported sources</a>
323 </li>
324 <li>
325 <a href="//embedpress.com/docs" target="_blank" rel="noopener noreferrer"
326 title="EmbedPress Documentation">Documentation</a>
327 </li>
328 <li>
329 <a href="//embedpress.com/addons/" target="_blank" rel="noopener noreferrer"
330 title="EmbedPress Add-Ons">Add-Ons</a>
331 </li>
332 <li>
333 <a href="//embedpress.com/contact" target="_blank" rel="noopener noreferrer"
334 title="Contact the EmbedPress team">Contact</a>
335 </li>
336 <li>
337 <a href="//twitter.com/embedpress" target="_blank" rel="noopener noreferrer">
338 <span class="dashicons dashicons-twitter"></span>
339 </a>
340 </li>
341 <li>
342 <a href="//facebook.com/embedpress" target="_blank" rel="noopener noreferrer">
343 <span class="dashicons dashicons-facebook"></span>
344 </a>
345 </li>
346 </ul>
347 </nav>
348 <p>
349 <a href="//embedpress.com" target="_blank" rel="noopener noreferrer">
350 <img width="100" src="//embedpress.com/wp-content/uploads/2018/01/ep-logo-2.png">
351 </a>
352 </p>
353 </footer>
354 </div>
355 <?php
356 }
357
358 /**
359 * Method that validates the form data.
360 *
361 * @since 1.0.0
362 * @static
363 *
364 * @param mixed $freshData Data received from the form.
365 *
366 * @return array
367 */
368 public static function validateForm($freshData)
369 {
370 $data = [
371 'enablePluginInAdmin' => isset($freshData['enablePluginInAdmin']) ? (bool)$freshData['enablePluginInAdmin'] : true,
372 'enablePluginInFront' => isset($freshData['enablePluginInFront']) ? (bool)$freshData['enablePluginInFront'] : true,
373 'fbLanguage' => $freshData['fbLanguage'],
374 ];
375
376 return $data;
377 }
378
379 /**
380 * Method that renders the enablePluginInAdmin input.
381 *
382 * @since 1.0.0
383 * @static
384 */
385 public static function renderField_enablePluginInAdmin()
386 {
387 $fieldName = "enablePluginInAdmin";
388
389 $options = get_option(self::$sectionGroupIdentifier);
390
391 $options[$fieldName] = ! isset($options[$fieldName]) ? true : (bool)$options[$fieldName];
392
393 echo '<label><input type="radio" id="' . $fieldName . '_0" name="' . self::$sectionGroupIdentifier . '[' . $fieldName . ']" value="0" ' . (! $options[$fieldName] ? "checked" : "") . ' /> No</label>';
394 echo "&nbsp;&nbsp;";
395 echo '<label><input type="radio" id="' . $fieldName . '_1" name="' . self::$sectionGroupIdentifier . '[' . $fieldName . ']" value="1" ' . ($options[$fieldName] ? "checked" : "") . ' /> Yes</label>';
396 echo '<p class="description">Do you want EmbedPress to run here in the admin area? Disabling this <strong>will not</strong> affect your frontend embeds.</p>';
397 }
398
399 /**
400 * Method that renders the enablePluginInFront input.
401 *
402 * @since 1.6.0
403 * @static
404 */
405 public static function renderField_enablePluginInFront()
406 {
407 $fieldName = "enablePluginInFront";
408
409 $options = get_option(self::$sectionGroupIdentifier);
410
411 $options[$fieldName] = ! isset($options[$fieldName]) ? true : (bool)$options[$fieldName];
412
413 echo '<label><input type="radio" id="' . $fieldName . '_0" name="' . self::$sectionGroupIdentifier . '[' . $fieldName . ']" value="0" ' . (! $options[$fieldName] ? "checked" : "") . ' /> No</label>';
414 echo "&nbsp;&nbsp;";
415 echo '<label><input type="radio" id="' . $fieldName . '_1" name="' . self::$sectionGroupIdentifier . '[' . $fieldName . ']" value="1" ' . ($options[$fieldName] ? "checked" : "") . ' /> Yes</label>';
416 echo '<p class="description">Do you want EmbedPress to run within editors in frontend (if there\'s any)? Disabling this <strong>will not</strong> affect embeds seem by your regular users in frontend.</p>';
417 }
418
419 /**
420 * Method that renders the forceFacebookLanguage input.
421 *
422 * @since 1.3.0
423 * @static
424 */
425 public static function renderField_forceFacebookLanguage()
426 {
427 $fieldName = "fbLanguage";
428
429 $options = get_option(self::$sectionGroupIdentifier);
430
431 $options[$fieldName] = ! isset($options[$fieldName]) ? "" : $options[$fieldName];
432
433 $facebookLocales = self::getFacebookAvailableLocales();
434
435 echo '<select name="' . self::$sectionGroupIdentifier . '[' . $fieldName . ']">';
436 echo '<option value="0">Automatic (by Facebook)</option>';
437 echo '<optgroup label="Available">';
438 foreach ($facebookLocales as $locale => $localeName) {
439 echo '<option value="' . $locale . '"' . ($options[$fieldName] === $locale ? ' selected' : '') . '>' . $localeName . '</option>';
440 }
441 echo '</optgroup>';
442 echo '</select>';
443
444 echo '<p class="description">Sometimes Facebook can choose the wrong language for embeds. If this happens, choose the correct language here.</p>';
445 }
446
447 /**
448 * Returns a list of locales that can be used on Facebook embeds.
449 *
450 * @since 1.3.0
451 * @static
452 *
453 * @return array
454 */
455 public static function getFacebookAvailableLocales()
456 {
457 $locales = [
458 'af_ZA' => "Afrikaans",
459 'ak_GH' => "Akan",
460 'am_ET' => "Amharic",
461 'ar_AR' => "Arabic",
462 'as_IN' => "Assamese",
463 'ay_BO' => "Aymara",
464 'az_AZ' => "Azerbaijani",
465 'be_BY' => "Belarusian",
466 'bg_BG' => "Bulgarian",
467 'bn_IN' => "Bengali",
468 'br_FR' => "Breton",
469 'bs_BA' => "Bosnian",
470 'ca_ES' => "Catalan",
471 'cb_IQ' => "Sorani Kurdish",
472 'ck_US' => "Cherokee",
473 'co_FR' => "Corsican",
474 'cs_CZ' => "Czech",
475 'cx_PH' => "Cebuano",
476 'cy_GB' => "Welsh",
477 'da_DK' => "Danish",
478 'de_DE' => "German",
479 'el_GR' => "Greek",
480 'en_GB' => "English (UK)",
481 'en_IN' => "English (India)",
482 'en_PI' => "English (Pirate)",
483 'en_UD' => "English (Upside Down)",
484 'en_US' => "English (US)",
485 'eo_EO' => "Esperanto",
486 'es_CL' => "Spanish (Chile)",
487 'es_CO' => "Spanish (Colombia)",
488 'es_ES' => "Spanish (Spain)",
489 'es_LA' => "Spanish",
490 'es_MX' => "Spanish (Mexico)",
491 'es_VE' => "Spanish (Venezuela)",
492 'et_EE' => "Estonian",
493 'eu_ES' => "Basque",
494 'fa_IR' => "Persian",
495 'fb_LT' => "Leet Speak",
496 'ff_NG' => "Fulah",
497 'fi_FI' => "Finnish",
498 'fo_FO' => "Faroese",
499 'fr_CA' => "French (Canada)",
500 'fr_FR' => "French (France)",
501 'fy_NL' => "Frisian",
502 'ga_IE' => "Irish",
503 'gl_ES' => "Galician",
504 'gn_PY' => "Guarani",
505 'gu_IN' => "Gujarati",
506 'gx_GR' => "Classical Greek",
507 'ha_NG' => "Hausa",
508 'he_IL' => "Hebrew",
509 'hi_IN' => "Hindi",
510 'hr_HR' => "Croatian",
511 'ht_HT' => "Haitian Creole",
512 'hu_HU' => "Hungarian",
513 'hy_AM' => "Armenian",
514 'id_ID' => "Indonesian",
515 'ig_NG' => "Igbo",
516 'is_IS' => "Icelandic",
517 'it_IT' => "Italian",
518 'ja_JP' => "Japanese",
519 'ja_KS' => "Japanese (Kansai)",
520 'jv_ID' => "Javanese",
521 'ka_GE' => "Georgian",
522 'kk_KZ' => "Kazakh",
523 'km_KH' => "Khmer",
524 'kn_IN' => "Kannada",
525 'ko_KR' => "Korean",
526 'ku_TR' => "Kurdish (Kurmanji)",
527 'ky_KG' => "Kyrgyz",
528 'la_VA' => "Latin",
529 'lg_UG' => "Ganda",
530 'li_NL' => "Limburgish",
531 'ln_CD' => "Lingala",
532 'lo_LA' => "Lao",
533 'lt_LT' => "Lithuanian",
534 'lv_LV' => "Latvian",
535 'mg_MG' => "Malagasy",
536 'mi_NZ' => "Māori",
537 'mk_MK' => "Macedonian",
538 'ml_IN' => "Malayalam",
539 'mn_MN' => "Mongolian",
540 'mr_IN' => "Marathi",
541 'ms_MY' => "Malay",
542 'mt_MT' => "Maltese",
543 'my_MM' => "Burmese",
544 'nb_NO' => "Norwegian (bokmal)",
545 'nd_ZW' => "Ndebele",
546 'ne_NP' => "Nepali",
547 'nl_BE' => "Dutch (België)",
548 'nl_NL' => "Dutch",
549 'nn_NO' => "Norwegian (nynorsk)",
550 'ny_MW' => "Chewa",
551 'or_IN' => "Oriya",
552 'pa_IN' => "Punjabi",
553 'pl_PL' => "Polish",
554 'ps_AF' => "Pashto",
555 'pt_BR' => "Portuguese (Brazil)",
556 'pt_PT' => "Portuguese (Portugal)",
557 'qc_GT' => "Quiché",
558 'qu_PE' => "Quechua",
559 'rm_CH' => "Romansh",
560 'ro_RO' => "Romanian",
561 'ru_RU' => "Russian",
562 'rw_RW' => "Kinyarwanda",
563 'sa_IN' => "Sanskrit",
564 'sc_IT' => "Sardinian",
565 'se_NO' => "Northern Sámi",
566 'si_LK' => "Sinhala",
567 'sk_SK' => "Slovak",
568 'sl_SI' => "Slovenian",
569 'sn_ZW' => "Shona",
570 'so_SO' => "Somali",
571 'sq_AL' => "Albanian",
572 'sr_RS' => "Serbian",
573 'sv_SE' => "Swedish",
574 'sw_KE' => "Swahili",
575 'sy_SY' => "Syriac",
576 'sz_PL' => "Silesian",
577 'ta_IN' => "Tamil",
578 'te_IN' => "Telugu",
579 'tg_TJ' => "Tajik",
580 'th_TH' => "Thai",
581 'tk_TM' => "Turkmen",
582 'tl_PH' => "Filipino",
583 'tl_ST' => "Klingon",
584 'tr_TR' => "Turkish",
585 'tt_RU' => "Tatar",
586 'tz_MA' => "Tamazight",
587 'uk_UA' => "Ukrainian",
588 'ur_PK' => "Urdu",
589 'uz_UZ' => "Uzbek",
590 'vi_VN' => "Vietnamese",
591 'wo_SN' => "Wolof",
592 'xh_ZA' => "Xhosa",
593 'yi_DE' => "Yiddish",
594 'yo_NG' => "Yoruba",
595 'zh_CN' => "Simplified Chinese (China)",
596 'zh_HK' => "Traditional Chinese (Hong Kong)",
597 'zh_TW' => "Traditional Chinese (Taiwan)",
598 'zu_ZA' => "Zulu",
599 'zz_TR' => "Zazaki",
600 ];
601
602 return $locales;
603 }
604 }
605