| @@ -4,20 +4,21 @@ | ||
| 4 | 4 | * |
| 5 | 5 | * Returns an array of countries and codes. |
| 6 | 6 | * |
| 7 | 7 | * @author WooThemes |
| 8 | + * | |
| 8 | 9 | * @category i18n |
| 9 | 10 | * @package fluentform/i18n |
| 11 | + * | |
| 10 | 12 | * @version 2.5.0 |
| 11 | 13 | */ |
| 12 | - | |
| 13 | -if (!defined('ABSPATH')) { | |
| 14 | +if (! defined('ABSPATH')) { | |
| 14 | 15 | exit; |
| 15 | 16 | } |
| 16 | 17 | |
| 17 | -$country_names = array( | |
| 18 | +$fluentformCountryNames = [ | |
| 18 | 19 | 'AF' => __('Afghanistan', 'fluentform'), |
| 19 | - 'AX' => __('Åland Islands', 'fluentform'), | |
| 20 | + 'AX' => __('Aland Islands', 'fluentform'), | |
| 20 | 21 | 'AL' => __('Albania', 'fluentform'), |
| 21 | 22 | 'DZ' => __('Algeria', 'fluentform'), |
| 22 | 23 | 'AS' => __('American Samoa', 'fluentform'), |
| 23 | 24 | 'AD' => __('Andorra', 'fluentform'), |
| @@ -36,9 +37,9 @@ | ||
| 36 | 37 | 'BD' => __('Bangladesh', 'fluentform'), |
| 37 | 38 | 'BB' => __('Barbados', 'fluentform'), |
| 38 | 39 | 'BY' => __('Belarus', 'fluentform'), |
| 39 | 40 | 'BE' => __('Belgium', 'fluentform'), |
| 40 | - 'PW' => __('Belau', 'fluentform'), | |
| 41 | + 'PW' => __('Palau', 'fluentform'), | |
| 41 | 42 | 'BZ' => __('Belize', 'fluentform'), |
| 42 | 43 | 'BJ' => __('Benin', 'fluentform'), |
| 43 | 44 | 'BM' => __('Bermuda', 'fluentform'), |
| 44 | 45 | 'BT' => __('Bhutan', 'fluentform'), |
| @@ -56,9 +57,9 @@ | ||
| 56 | 57 | 'BI' => __('Burundi', 'fluentform'), |
| 57 | 58 | 'KH' => __('Cambodia', 'fluentform'), |
| 58 | 59 | 'CM' => __('Cameroon', 'fluentform'), |
| 59 | 60 | 'CA' => __('Canada', 'fluentform'), |
| 60 | - 'CV' => __('Cape Verde', 'fluentform'), | |
| 61 | + 'CV' => __('Cabo Verde', 'fluentform'), | |
| 61 | 62 | 'KY' => __('Cayman Islands', 'fluentform'), |
| 62 | 63 | 'CF' => __('Central African Republic', 'fluentform'), |
| 63 | 64 | 'TD' => __('Chad', 'fluentform'), |
| 64 | 65 | 'CL' => __('Chile', 'fluentform'), |
| @@ -66,15 +67,15 @@ | ||
| 66 | 67 | 'CX' => __('Christmas Island', 'fluentform'), |
| 67 | 68 | 'CC' => __('Cocos (Keeling) Islands', 'fluentform'), |
| 68 | 69 | 'CO' => __('Colombia', 'fluentform'), |
| 69 | 70 | 'KM' => __('Comoros', 'fluentform'), |
| 70 | - 'CG' => __('Congo (Brazzaville)', 'fluentform'), | |
| 71 | - 'CD' => __('Congo (Kinshasa)', 'fluentform'), | |
| 71 | + 'CG' => __('Republic of the Congo (Brazzaville)', 'fluentform'), | |
| 72 | + 'CD' => __('Democratic Republic of the Congo (Kinshasa)', 'fluentform'), | |
| 72 | 73 | 'CK' => __('Cook Islands', 'fluentform'), |
| 73 | 74 | 'CR' => __('Costa Rica', 'fluentform'), |
| 74 | 75 | 'HR' => __('Croatia', 'fluentform'), |
| 75 | 76 | 'CU' => __('Cuba', 'fluentform'), |
| 76 | - 'CW' => __('Curaçao', 'fluentform'), | |
| 77 | + 'CW' => __('Curaçao', 'fluentform'), | |
| 77 | 78 | 'CY' => __('Cyprus', 'fluentform'), |
| 78 | 79 | 'CZ' => __('Czech Republic', 'fluentform'), |
| 79 | 80 | 'DK' => __('Denmark', 'fluentform'), |
| 80 | 81 | 'DJ' => __('Djibouti', 'fluentform'), |
| @@ -145,9 +146,9 @@ | ||
| 145 | 146 | 'LI' => __('Liechtenstein', 'fluentform'), |
| 146 | 147 | 'LT' => __('Lithuania', 'fluentform'), |
| 147 | 148 | 'LU' => __('Luxembourg', 'fluentform'), |
| 148 | 149 | 'MO' => __('Macao S.A.R., China', 'fluentform'), |
| 149 | - 'MK' => __('Macedonia', 'fluentform'), | |
| 150 | + 'MK' => __('North Macedonia', 'fluentform'), | |
| 150 | 151 | 'MG' => __('Madagascar', 'fluentform'), |
| 151 | 152 | 'MW' => __('Malawi', 'fluentform'), |
| 152 | 153 | 'MY' => __('Malaysia', 'fluentform'), |
| 153 | 154 | 'MV' => __('Maldives', 'fluentform'), |
| @@ -194,13 +195,13 @@ | ||
| 194 | 195 | 'PL' => __('Poland', 'fluentform'), |
| 195 | 196 | 'PT' => __('Portugal', 'fluentform'), |
| 196 | 197 | 'PR' => __('Puerto Rico', 'fluentform'), |
| 197 | 198 | 'QA' => __('Qatar', 'fluentform'), |
| 198 | - 'RE' => __('Reunion', 'fluentform'), | |
| 199 | + 'RE' => __('Réunion', 'fluentform'), | |
| 199 | 200 | 'RO' => __('Romania', 'fluentform'), |
| 200 | 201 | 'RU' => __('Russia', 'fluentform'), |
| 201 | 202 | 'RW' => __('Rwanda', 'fluentform'), |
| 202 | - 'BL' => __('Saint Barthélemy', 'fluentform'), | |
| 203 | + 'BL' => __('Saint Barthélemy', 'fluentform'), | |
| 203 | 204 | 'SH' => __('Saint Helena', 'fluentform'), |
| 204 | 205 | 'KN' => __('Saint Kitts and Nevis', 'fluentform'), |
| 205 | 206 | 'LC' => __('Saint Lucia', 'fluentform'), |
| 206 | 207 | 'MF' => __('Saint Martin (French part)', 'fluentform'), |
| @@ -207,9 +208,9 @@ | ||
| 207 | 208 | 'SX' => __('Saint Martin (Dutch part)', 'fluentform'), |
| 208 | 209 | 'PM' => __('Saint Pierre and Miquelon', 'fluentform'), |
| 209 | 210 | 'VC' => __('Saint Vincent and the Grenadines', 'fluentform'), |
| 210 | 211 | 'SM' => __('San Marino', 'fluentform'), |
| 211 | - 'ST' => __('São Tomé and Príncipe', 'fluentform'), | |
| 212 | + 'ST' => __('Sao Tome and Principe', 'fluentform'), | |
| 212 | 213 | 'SA' => __('Saudi Arabia', 'fluentform'), |
| 213 | 214 | 'SN' => __('Senegal', 'fluentform'), |
| 214 | 215 | 'RS' => __('Serbia', 'fluentform'), |
| 215 | 216 | 'SC' => __('Seychelles', 'fluentform'), |
| @@ -227,9 +228,9 @@ | ||
| 227 | 228 | 'LK' => __('Sri Lanka', 'fluentform'), |
| 228 | 229 | 'SD' => __('Sudan', 'fluentform'), |
| 229 | 230 | 'SR' => __('Suriname', 'fluentform'), |
| 230 | 231 | 'SJ' => __('Svalbard and Jan Mayen', 'fluentform'), |
| 231 | - 'SZ' => __('Swaziland', 'fluentform'), | |
| 232 | + 'SZ' => __('Eswatini', 'fluentform'), | |
| 232 | 233 | 'SE' => __('Sweden', 'fluentform'), |
| 233 | 234 | 'CH' => __('Switzerland', 'fluentform'), |
| 234 | 235 | 'SY' => __('Syria', 'fluentform'), |
| 235 | 236 | 'TW' => __('Taiwan', 'fluentform'), |
| @@ -241,9 +242,9 @@ | ||
| 241 | 242 | 'TK' => __('Tokelau', 'fluentform'), |
| 242 | 243 | 'TO' => __('Tonga', 'fluentform'), |
| 243 | 244 | 'TT' => __('Trinidad and Tobago', 'fluentform'), |
| 244 | 245 | 'TN' => __('Tunisia', 'fluentform'), |
| 245 | - 'TR' => __('Turkey', 'fluentform'), | |
| 246 | + 'TR' => __('Türkiye', 'fluentform'), | |
| 246 | 247 | 'TM' => __('Turkmenistan', 'fluentform'), |
| 247 | 248 | 'TC' => __('Turks and Caicos Islands', 'fluentform'), |
| 248 | 249 | 'TV' => __('Tuvalu', 'fluentform'), |
| 249 | 250 | 'UG' => __('Uganda', 'fluentform'), |
| @@ -264,7 +265,21 @@ | ||
| 264 | 265 | 'WS' => __('Samoa', 'fluentform'), |
| 265 | 266 | 'YE' => __('Yemen', 'fluentform'), |
| 266 | 267 | 'ZM' => __('Zambia', 'fluentform'), |
| 267 | 268 | 'ZW' => __('Zimbabwe', 'fluentform'), |
| 269 | +]; | |
| 270 | + | |
| 271 | +$fluentformCountryNames = apply_filters_deprecated( | |
| 272 | + 'fluent_editor_countries', | |
| 273 | + [ | |
| 274 | + $fluentformCountryNames | |
| 275 | + ], | |
| 276 | + FLUENTFORM_FRAMEWORK_UPGRADE, | |
| 277 | + 'fluentform/editor_countries', | |
| 278 | + 'Use fluentform/editor_countries instead of fluent_editor_countries.' | |
| 268 | 279 | ); |
| 269 | 280 | |
| 270 | -return apply_filters('fluent_editor_countries', $country_names); | |
| 281 | +$fluentformCountryNames = apply_filters('fluentform/editor_countries', $fluentformCountryNames); | |
| 282 | + | |
| 283 | +asort($fluentformCountryNames); | |
| 284 | + | |
| 285 | +return $fluentformCountryNames; | |