| 1 |
<?php |
| 2 |
|
| 3 |
namespace FakerPress; |
| 4 |
|
| 5 |
use FakerPress\ThirdParty\Faker; |
| 6 |
use FakerPress\ThirdParty\Faker\Provider\Base; |
| 7 |
|
| 8 |
class Utils { |
| 9 |
/** |
| 10 |
* Formats an array of HTML attributes into a string. |
| 11 |
* |
| 12 |
* @since 0.5.1 |
| 13 |
* |
| 14 |
* @param array $attributes Attributes used to build the string. |
| 15 |
* |
| 16 |
* @return string Formatted attributes. |
| 17 |
*/ |
| 18 |
public static function attr( $attributes = [] ) { |
| 19 |
if ( is_scalar( $attributes ) ) { |
| 20 |
return ''; |
| 21 |
} |
| 22 |
|
| 23 |
$html = []; |
| 24 |
$attributes = (array) $attributes; |
| 25 |
|
| 26 |
foreach ( $attributes as $key => $value ) { |
| 27 |
if ( is_null( $value ) || false === $value ) { |
| 28 |
continue; |
| 29 |
} |
| 30 |
|
| 31 |
if ( 'label' === $key ) { |
| 32 |
continue; |
| 33 |
} |
| 34 |
|
| 35 |
if ( '_' === substr( $key, 0, 1 ) ) { |
| 36 |
$key = substr_replace( $key, 'data-', 0, 1 ); |
| 37 |
} |
| 38 |
|
| 39 |
if ( 'class' === $key && ! is_array( $value ) ) { |
| 40 |
$value = (array) $value; |
| 41 |
} |
| 42 |
|
| 43 |
$attr = $key; |
| 44 |
|
| 45 |
if ( ! is_scalar( $value ) ) { |
| 46 |
if ( 'class' === $key ) { |
| 47 |
$value = array_map( [ static::class, 'abbr' ], (array) $value ); |
| 48 |
|
| 49 |
// Make sure buttons also get the `button` class |
| 50 |
if ( in_array( 'fp-type-button', $value ) ) { |
| 51 |
$value[] = 'button'; |
| 52 |
} |
| 53 |
|
| 54 |
$value = array_map( 'sanitize_html_class', $value ); |
| 55 |
$value = implode( ' ', $value ); |
| 56 |
} else { |
| 57 |
$value = htmlspecialchars( json_encode( $value ), ENT_QUOTES, 'UTF-8' ); |
| 58 |
} |
| 59 |
} |
| 60 |
if ( ! is_bool( $value ) || true !== $value ) { |
| 61 |
$attr .= '="' . $value . '"'; |
| 62 |
} |
| 63 |
|
| 64 |
$html[ $key ] = $attr; |
| 65 |
} |
| 66 |
|
| 67 |
return ' ' . implode( ' ', $html ) . ' '; |
| 68 |
} |
| 69 |
|
| 70 |
/** |
| 71 |
* Adds a abbreviation for the plugin to a string. |
| 72 |
* Used for prepending HTML classes. |
| 73 |
* |
| 74 |
* @since 0.5.1 |
| 75 |
* |
| 76 |
* @param string $str String to which we are adding the abbr. |
| 77 |
* |
| 78 |
* @return string String with the abbr prepended to. |
| 79 |
*/ |
| 80 |
public static function abbr( $str = '' ) { |
| 81 |
return 'fp-' . $str; |
| 82 |
} |
| 83 |
|
| 84 |
/** |
| 85 |
* Remove the Period on the end of the sentence from Faker. |
| 86 |
* |
| 87 |
* @param string $sentence Which sentence we should remove the period from. |
| 88 |
* |
| 89 |
* @return string |
| 90 |
*/ |
| 91 |
public function remove_sentence_period( $sentence ) { |
| 92 |
return rtrim( $sentence, '.' ); |
| 93 |
} |
| 94 |
|
| 95 |
/** |
| 96 |
* From range return a random Integer |
| 97 |
* Providing the $total param will limit the returning integer to the total number of elements |
| 98 |
* |
| 99 |
* @param array|int $range The range or integer |
| 100 |
* @param null|int|array $total { |
| 101 |
* |
| 102 |
* @return int |
| 103 |
* @example int Limits the range to this maximum |
| 104 |
* @example array Counts the elements in array and limit to that |
| 105 |
* } |
| 106 |
* @example null Will not limit the Range to a maximum int |
| 107 |
*/ |
| 108 |
public function get_qty_from_range( $range, $total = null ) { |
| 109 |
if ( is_array( $range ) ) { |
| 110 |
// Remove non-wanted items |
| 111 |
$range = array_filter( $range ); |
| 112 |
|
| 113 |
// Grabs Min |
| 114 |
$min = reset( $range ); |
| 115 |
|
| 116 |
// Grabs Max if range has 2 elements |
| 117 |
if ( count( $range ) > 1 ) { |
| 118 |
$max = end( $range ); |
| 119 |
} else { |
| 120 |
// Otherwise just set qty to the Min |
| 121 |
$qty = $min; |
| 122 |
} |
| 123 |
} elseif ( is_numeric( $range ) ) { |
| 124 |
// If we have a numeric we just set it |
| 125 |
$qty = $range; |
| 126 |
} else { |
| 127 |
// All the other cases are a qty 0 |
| 128 |
return 0; |
| 129 |
} |
| 130 |
|
| 131 |
// Now we treat the Range and select a random number |
| 132 |
if ( ! isset( $qty ) ) { |
| 133 |
$qty = Base::numberBetween( $min, $max ); |
| 134 |
} |
| 135 |
|
| 136 |
// If an array for the total was provided, turn it to a integer |
| 137 |
if ( is_array( $total ) ) { |
| 138 |
$total = count( $total ); |
| 139 |
} |
| 140 |
|
| 141 |
// If we have a numeric total, make sure we don't go over that |
| 142 |
if ( is_numeric( $total ) ) { |
| 143 |
$qty = min( $qty, $total ); |
| 144 |
} |
| 145 |
|
| 146 |
// We just make sure we are dealing with an absolute number |
| 147 |
return absint( $qty ); |
| 148 |
} |
| 149 |
|
| 150 |
/** |
| 151 |
* Based on the English version of a country gets it's 2 or 3 alpha code |
| 152 |
* |
| 153 |
* @param string|null $country_name If you want to get all the codes, pass null |
| 154 |
* @param int $type How many characters is the code, 2 or 3 |
| 155 |
* |
| 156 |
* @return string It will be Uppercase |
| 157 |
*/ |
| 158 |
public static function get_country_alpha_code( $country_name = null, int $type = 2 ) { |
| 159 |
$countries = [ |
| 160 |
[ |
| 161 |
'name' => esc_attr__( 'Afghanistan', 'fakerpress' ), |
| 162 |
'alpha2code' => 'AF', |
| 163 |
'alpha3code' => 'AFG', |
| 164 |
], |
| 165 |
[ |
| 166 |
'name' => esc_attr__( '� |
| 167 |
land Islands', 'fakerpress' ), |
| 168 |
'alpha2code' => 'AX', |
| 169 |
'alpha3code' => 'ALA', |
| 170 |
], |
| 171 |
[ |
| 172 |
'name' => esc_attr__( 'Albania', 'fakerpress' ), |
| 173 |
'alpha2code' => 'AL', |
| 174 |
'alpha3code' => 'ALB', |
| 175 |
], |
| 176 |
[ |
| 177 |
'name' => esc_attr__( 'Algeria', 'fakerpress' ), |
| 178 |
'alpha2code' => 'DZ', |
| 179 |
'alpha3code' => 'DZA', |
| 180 |
], |
| 181 |
[ |
| 182 |
'name' => esc_attr__( 'American Samoa', 'fakerpress' ), |
| 183 |
'alpha2code' => 'AS', |
| 184 |
'alpha3code' => 'ASM', |
| 185 |
], |
| 186 |
[ |
| 187 |
'name' => esc_attr__( 'Andorra', 'fakerpress' ), |
| 188 |
'alpha2code' => 'AD', |
| 189 |
'alpha3code' => 'AND', |
| 190 |
], |
| 191 |
[ |
| 192 |
'name' => esc_attr__( 'Angola', 'fakerpress' ), |
| 193 |
'alpha2code' => 'AO', |
| 194 |
'alpha3code' => 'AGO', |
| 195 |
], |
| 196 |
[ |
| 197 |
'name' => esc_attr__( 'Anguilla', 'fakerpress' ), |
| 198 |
'alpha2code' => 'AI', |
| 199 |
'alpha3code' => 'AIA', |
| 200 |
], |
| 201 |
[ |
| 202 |
'name' => esc_attr__( 'Antigua and Barbuda', 'fakerpress' ), |
| 203 |
'alpha2code' => 'AG', |
| 204 |
'alpha3code' => 'ATG', |
| 205 |
], |
| 206 |
[ |
| 207 |
'name' => esc_attr__( 'Argentina', 'fakerpress' ), |
| 208 |
'alpha2code' => 'AR', |
| 209 |
'alpha3code' => 'ARG', |
| 210 |
], |
| 211 |
[ |
| 212 |
'name' => esc_attr__( 'Armenia', 'fakerpress' ), |
| 213 |
'alpha2code' => 'AM', |
| 214 |
'alpha3code' => 'ARM', |
| 215 |
], |
| 216 |
[ |
| 217 |
'name' => esc_attr__( 'Aruba', 'fakerpress' ), |
| 218 |
'alpha2code' => 'AW', |
| 219 |
'alpha3code' => 'ABW', |
| 220 |
], |
| 221 |
[ |
| 222 |
'name' => esc_attr__( 'Australia', 'fakerpress' ), |
| 223 |
'alpha2code' => 'AU', |
| 224 |
'alpha3code' => 'AUS', |
| 225 |
], |
| 226 |
[ |
| 227 |
'name' => esc_attr__( 'Austria', 'fakerpress' ), |
| 228 |
'alpha2code' => 'AT', |
| 229 |
'alpha3code' => 'AUT', |
| 230 |
], |
| 231 |
[ |
| 232 |
'name' => esc_attr__( 'Azerbaijan', 'fakerpress' ), |
| 233 |
'alpha2code' => 'AZ', |
| 234 |
'alpha3code' => 'AZE', |
| 235 |
], |
| 236 |
[ |
| 237 |
'name' => esc_attr__( 'The Bahamas', 'fakerpress' ), |
| 238 |
'alpha2code' => 'BS', |
| 239 |
'alpha3code' => 'BHS', |
| 240 |
], |
| 241 |
[ |
| 242 |
'name' => esc_attr__( 'Bahrain', 'fakerpress' ), |
| 243 |
'alpha2code' => 'BH', |
| 244 |
'alpha3code' => 'BHR', |
| 245 |
], |
| 246 |
[ |
| 247 |
'name' => esc_attr__( 'Bangladesh', 'fakerpress' ), |
| 248 |
'alpha2code' => 'BD', |
| 249 |
'alpha3code' => 'BGD', |
| 250 |
], |
| 251 |
[ |
| 252 |
'name' => esc_attr__( 'Barbados', 'fakerpress' ), |
| 253 |
'alpha2code' => 'BB', |
| 254 |
'alpha3code' => 'BRB', |
| 255 |
], |
| 256 |
[ |
| 257 |
'name' => esc_attr__( 'Belarus', 'fakerpress' ), |
| 258 |
'alpha2code' => 'BY', |
| 259 |
'alpha3code' => 'BLR', |
| 260 |
], |
| 261 |
[ |
| 262 |
'name' => esc_attr__( 'Belgium', 'fakerpress' ), |
| 263 |
'alpha2code' => 'BE', |
| 264 |
'alpha3code' => 'BEL', |
| 265 |
], |
| 266 |
[ |
| 267 |
'name' => esc_attr__( 'Belize', 'fakerpress' ), |
| 268 |
'alpha2code' => 'BZ', |
| 269 |
'alpha3code' => 'BLZ', |
| 270 |
], |
| 271 |
[ |
| 272 |
'name' => esc_attr__( 'Benin', 'fakerpress' ), |
| 273 |
'alpha2code' => 'BJ', |
| 274 |
'alpha3code' => 'BEN', |
| 275 |
], |
| 276 |
[ |
| 277 |
'name' => esc_attr__( 'Bermuda', 'fakerpress' ), |
| 278 |
'alpha2code' => 'BM', |
| 279 |
'alpha3code' => 'BMU', |
| 280 |
], |
| 281 |
[ |
| 282 |
'name' => esc_attr__( 'Bhutan', 'fakerpress' ), |
| 283 |
'alpha2code' => 'BT', |
| 284 |
'alpha3code' => 'BTN', |
| 285 |
], |
| 286 |
[ |
| 287 |
'name' => esc_attr__( 'Bolivia', 'fakerpress' ), |
| 288 |
'alpha2code' => 'BO', |
| 289 |
'alpha3code' => 'BOL', |
| 290 |
], |
| 291 |
[ |
| 292 |
'name' => esc_attr__( 'Bonaire', 'fakerpress' ), |
| 293 |
'alpha2code' => 'BQ', |
| 294 |
'alpha3code' => 'BES', |
| 295 |
], |
| 296 |
[ |
| 297 |
'name' => esc_attr__( 'Bosnia and Herzegovina', 'fakerpress' ), |
| 298 |
'alpha2code' => 'BA', |
| 299 |
'alpha3code' => 'BIH', |
| 300 |
], |
| 301 |
[ |
| 302 |
'name' => esc_attr__( 'Botswana', 'fakerpress' ), |
| 303 |
'alpha2code' => 'BW', |
| 304 |
'alpha3code' => 'BWA', |
| 305 |
], |
| 306 |
[ |
| 307 |
'name' => esc_attr__( 'Bouvet Island', 'fakerpress' ), |
| 308 |
'alpha2code' => 'BV', |
| 309 |
'alpha3code' => 'BVT', |
| 310 |
], |
| 311 |
[ |
| 312 |
'name' => esc_attr__( 'Brazil', 'fakerpress' ), |
| 313 |
'alpha2code' => 'BR', |
| 314 |
'alpha3code' => 'BRA', |
| 315 |
], |
| 316 |
[ |
| 317 |
'name' => esc_attr__( 'British Indian Ocean Territory', 'fakerpress' ), |
| 318 |
'alpha2code' => 'IO', |
| 319 |
'alpha3code' => 'IOT', |
| 320 |
], |
| 321 |
[ |
| 322 |
'name' => esc_attr__( 'United States Minor Outlying Islands', 'fakerpress' ), |
| 323 |
'alpha2code' => 'UM', |
| 324 |
'alpha3code' => 'UMI', |
| 325 |
], |
| 326 |
[ |
| 327 |
'name' => esc_attr__( 'British Virgin Islands', 'fakerpress' ), |
| 328 |
'alpha2code' => 'VG', |
| 329 |
'alpha3code' => 'VGB', |
| 330 |
], |
| 331 |
[ |
| 332 |
'name' => esc_attr__( 'Brunei', 'fakerpress' ), |
| 333 |
'alpha2code' => 'BN', |
| 334 |
'alpha3code' => 'BRN', |
| 335 |
], |
| 336 |
[ |
| 337 |
'name' => esc_attr__( 'Bulgaria', 'fakerpress' ), |
| 338 |
'alpha2code' => 'BG', |
| 339 |
'alpha3code' => 'BGR', |
| 340 |
], |
| 341 |
[ |
| 342 |
'name' => esc_attr__( 'Burkina Faso', 'fakerpress' ), |
| 343 |
'alpha2code' => 'BF', |
| 344 |
'alpha3code' => 'BFA', |
| 345 |
], |
| 346 |
[ |
| 347 |
'name' => esc_attr__( 'Burundi', 'fakerpress' ), |
| 348 |
'alpha2code' => 'BI', |
| 349 |
'alpha3code' => 'BDI', |
| 350 |
], |
| 351 |
[ |
| 352 |
'name' => esc_attr__( 'Cambodia', 'fakerpress' ), |
| 353 |
'alpha2code' => 'KH', |
| 354 |
'alpha3code' => 'KHM', |
| 355 |
], |
| 356 |
[ |
| 357 |
'name' => esc_attr__( 'Cameroon', 'fakerpress' ), |
| 358 |
'alpha2code' => 'CM', |
| 359 |
'alpha3code' => 'CMR', |
| 360 |
], |
| 361 |
[ |
| 362 |
'name' => esc_attr__( 'Canada', 'fakerpress' ), |
| 363 |
'alpha2code' => 'CA', |
| 364 |
'alpha3code' => 'CAN', |
| 365 |
], |
| 366 |
[ |
| 367 |
'name' => esc_attr__( 'Cape Verde', 'fakerpress' ), |
| 368 |
'alpha2code' => 'CV', |
| 369 |
'alpha3code' => 'CPV', |
| 370 |
], |
| 371 |
[ |
| 372 |
'name' => esc_attr__( 'Cayman Islands', 'fakerpress' ), |
| 373 |
'alpha2code' => 'KY', |
| 374 |
'alpha3code' => 'CYM', |
| 375 |
], |
| 376 |
[ |
| 377 |
'name' => esc_attr__( 'Central African Republic', 'fakerpress' ), |
| 378 |
'alpha2code' => 'CF', |
| 379 |
'alpha3code' => 'CAF', |
| 380 |
], |
| 381 |
[ |
| 382 |
'name' => esc_attr__( 'Chad', 'fakerpress' ), |
| 383 |
'alpha2code' => 'TD', |
| 384 |
'alpha3code' => 'TCD', |
| 385 |
], |
| 386 |
[ |
| 387 |
'name' => esc_attr__( 'Chile', 'fakerpress' ), |
| 388 |
'alpha2code' => 'CL', |
| 389 |
'alpha3code' => 'CHL', |
| 390 |
], |
| 391 |
[ |
| 392 |
'name' => esc_attr__( 'China', 'fakerpress' ), |
| 393 |
'alpha2code' => 'CN', |
| 394 |
'alpha3code' => 'CHN', |
| 395 |
], |
| 396 |
[ |
| 397 |
'name' => esc_attr__( 'Christmas Island', 'fakerpress' ), |
| 398 |
'alpha2code' => 'CX', |
| 399 |
'alpha3code' => 'CXR', |
| 400 |
], |
| 401 |
[ |
| 402 |
'name' => esc_attr__( 'Cocos (Keeling) Islands', 'fakerpress' ), |
| 403 |
'alpha2code' => 'CC', |
| 404 |
'alpha3code' => 'CCK', |
| 405 |
], |
| 406 |
[ |
| 407 |
'name' => esc_attr__( 'Colombia', 'fakerpress' ), |
| 408 |
'alpha2code' => 'CO', |
| 409 |
'alpha3code' => 'COL', |
| 410 |
], |
| 411 |
[ |
| 412 |
'name' => esc_attr__( 'Comoros', 'fakerpress' ), |
| 413 |
'alpha2code' => 'KM', |
| 414 |
'alpha3code' => 'COM', |
| 415 |
], |
| 416 |
[ |
| 417 |
'name' => esc_attr__( 'Republic of the Congo', 'fakerpress' ), |
| 418 |
'alpha2code' => 'CG', |
| 419 |
'alpha3code' => 'COG', |
| 420 |
], |
| 421 |
[ |
| 422 |
'name' => esc_attr__( 'Democratic Republic of the Congo', 'fakerpress' ), |
| 423 |
'alpha2code' => 'CD', |
| 424 |
'alpha3code' => 'COD', |
| 425 |
], |
| 426 |
[ |
| 427 |
'name' => esc_attr__( 'Cook Islands', 'fakerpress' ), |
| 428 |
'alpha2code' => 'CK', |
| 429 |
'alpha3code' => 'COK', |
| 430 |
], |
| 431 |
[ |
| 432 |
'name' => esc_attr__( 'Costa Rica', 'fakerpress' ), |
| 433 |
'alpha2code' => 'CR', |
| 434 |
'alpha3code' => 'CRI', |
| 435 |
], |
| 436 |
[ |
| 437 |
'name' => esc_attr__( 'Croatia', 'fakerpress' ), |
| 438 |
'alpha2code' => 'HR', |
| 439 |
'alpha3code' => 'HRV', |
| 440 |
], |
| 441 |
[ |
| 442 |
'name' => esc_attr__( 'Cuba', 'fakerpress' ), |
| 443 |
'alpha2code' => 'CU', |
| 444 |
'alpha3code' => 'CUB', |
| 445 |
], |
| 446 |
[ |
| 447 |
'name' => esc_attr__( 'Curaçao', 'fakerpress' ), |
| 448 |
'alpha2code' => 'CW', |
| 449 |
'alpha3code' => 'CUW', |
| 450 |
], |
| 451 |
[ |
| 452 |
'name' => esc_attr__( 'Cyprus', 'fakerpress' ), |
| 453 |
'alpha2code' => 'CY', |
| 454 |
'alpha3code' => 'CYP', |
| 455 |
], |
| 456 |
[ |
| 457 |
'name' => esc_attr__( 'Czech Republic', 'fakerpress' ), |
| 458 |
'alpha2code' => 'CZ', |
| 459 |
'alpha3code' => 'CZE', |
| 460 |
], |
| 461 |
[ |
| 462 |
'name' => esc_attr__( 'Denmark', 'fakerpress' ), |
| 463 |
'alpha2code' => 'DK', |
| 464 |
'alpha3code' => 'DNK', |
| 465 |
], |
| 466 |
[ |
| 467 |
'name' => esc_attr__( 'Djibouti', 'fakerpress' ), |
| 468 |
'alpha2code' => 'DJ', |
| 469 |
'alpha3code' => 'DJI', |
| 470 |
], |
| 471 |
[ |
| 472 |
'name' => esc_attr__( 'Dominica', 'fakerpress' ), |
| 473 |
'alpha2code' => 'DM', |
| 474 |
'alpha3code' => 'DMA', |
| 475 |
], |
| 476 |
[ |
| 477 |
'name' => esc_attr__( 'Dominican Republic', 'fakerpress' ), |
| 478 |
'alpha2code' => 'DO', |
| 479 |
'alpha3code' => 'DOM', |
| 480 |
], |
| 481 |
[ |
| 482 |
'name' => esc_attr__( 'Ecuador', 'fakerpress' ), |
| 483 |
'alpha2code' => 'EC', |
| 484 |
'alpha3code' => 'ECU', |
| 485 |
], |
| 486 |
[ |
| 487 |
'name' => esc_attr__( 'Egypt', 'fakerpress' ), |
| 488 |
'alpha2code' => 'EG', |
| 489 |
'alpha3code' => 'EGY', |
| 490 |
], |
| 491 |
[ |
| 492 |
'name' => esc_attr__( 'El Salvador', 'fakerpress' ), |
| 493 |
'alpha2code' => 'SV', |
| 494 |
'alpha3code' => 'SLV', |
| 495 |
], |
| 496 |
[ |
| 497 |
'name' => esc_attr__( 'Equatorial Guinea', 'fakerpress' ), |
| 498 |
'alpha2code' => 'GQ', |
| 499 |
'alpha3code' => 'GNQ', |
| 500 |
], |
| 501 |
[ |
| 502 |
'name' => esc_attr__( 'Eritrea', 'fakerpress' ), |
| 503 |
'alpha2code' => 'ER', |
| 504 |
'alpha3code' => 'ERI', |
| 505 |
], |
| 506 |
[ |
| 507 |
'name' => esc_attr__( 'Estonia', 'fakerpress' ), |
| 508 |
'alpha2code' => 'EE', |
| 509 |
'alpha3code' => 'EST', |
| 510 |
], |
| 511 |
[ |
| 512 |
'name' => esc_attr__( 'Ethiopia', 'fakerpress' ), |
| 513 |
'alpha2code' => 'ET', |
| 514 |
'alpha3code' => 'ETH', |
| 515 |
], |
| 516 |
[ |
| 517 |
'name' => esc_attr__( 'Falkland Islands', 'fakerpress' ), |
| 518 |
'alpha2code' => 'FK', |
| 519 |
'alpha3code' => 'FLK', |
| 520 |
], |
| 521 |
[ |
| 522 |
'name' => esc_attr__( 'Faroe Islands', 'fakerpress' ), |
| 523 |
'alpha2code' => 'FO', |
| 524 |
'alpha3code' => 'FRO', |
| 525 |
], |
| 526 |
[ |
| 527 |
'name' => esc_attr__( 'Fiji', 'fakerpress' ), |
| 528 |
'alpha2code' => 'FJ', |
| 529 |
'alpha3code' => 'FJI', |
| 530 |
], |
| 531 |
[ |
| 532 |
'name' => esc_attr__( 'Finland', 'fakerpress' ), |
| 533 |
'alpha2code' => 'FI', |
| 534 |
'alpha3code' => 'FIN', |
| 535 |
], |
| 536 |
[ |
| 537 |
'name' => esc_attr__( 'France', 'fakerpress' ), |
| 538 |
'alpha2code' => 'FR', |
| 539 |
'alpha3code' => 'FRA', |
| 540 |
], |
| 541 |
[ |
| 542 |
'name' => esc_attr__( 'French Guiana', 'fakerpress' ), |
| 543 |
'alpha2code' => 'GF', |
| 544 |
'alpha3code' => 'GUF', |
| 545 |
], |
| 546 |
[ |
| 547 |
'name' => esc_attr__( 'French Polynesia', 'fakerpress' ), |
| 548 |
'alpha2code' => 'PF', |
| 549 |
'alpha3code' => 'PYF', |
| 550 |
], |
| 551 |
[ |
| 552 |
'name' => esc_attr__( 'French Southern and Antarctic Lands', 'fakerpress' ), |
| 553 |
'alpha2code' => 'TF', |
| 554 |
'alpha3code' => 'ATF', |
| 555 |
], |
| 556 |
[ |
| 557 |
'name' => esc_attr__( 'Gabon', 'fakerpress' ), |
| 558 |
'alpha2code' => 'GA', |
| 559 |
'alpha3code' => 'GAB', |
| 560 |
], |
| 561 |
[ |
| 562 |
'name' => esc_attr__( 'The Gambia', 'fakerpress' ), |
| 563 |
'alpha2code' => 'GM', |
| 564 |
'alpha3code' => 'GMB', |
| 565 |
], |
| 566 |
[ |
| 567 |
'name' => esc_attr__( 'Georgia', 'fakerpress' ), |
| 568 |
'alpha2code' => 'GE', |
| 569 |
'alpha3code' => 'GEO', |
| 570 |
], |
| 571 |
[ |
| 572 |
'name' => esc_attr__( 'Germany', 'fakerpress' ), |
| 573 |
'alpha2code' => 'DE', |
| 574 |
'alpha3code' => 'DEU', |
| 575 |
], |
| 576 |
[ |
| 577 |
'name' => esc_attr__( 'Ghana', 'fakerpress' ), |
| 578 |
'alpha2code' => 'GH', |
| 579 |
'alpha3code' => 'GHA', |
| 580 |
], |
| 581 |
[ |
| 582 |
'name' => esc_attr__( 'Gibraltar', 'fakerpress' ), |
| 583 |
'alpha2code' => 'GI', |
| 584 |
'alpha3code' => 'GIB', |
| 585 |
], |
| 586 |
[ |
| 587 |
'name' => esc_attr__( 'Greece', 'fakerpress' ), |
| 588 |
'alpha2code' => 'GR', |
| 589 |
'alpha3code' => 'GRC', |
| 590 |
], |
| 591 |
[ |
| 592 |
'name' => esc_attr__( 'Greenland', 'fakerpress' ), |
| 593 |
'alpha2code' => 'GL', |
| 594 |
'alpha3code' => 'GRL', |
| 595 |
], |
| 596 |
[ |
| 597 |
'name' => esc_attr__( 'Grenada', 'fakerpress' ), |
| 598 |
'alpha2code' => 'GD', |
| 599 |
'alpha3code' => 'GRD', |
| 600 |
], |
| 601 |
[ |
| 602 |
'name' => esc_attr__( 'Guadeloupe', 'fakerpress' ), |
| 603 |
'alpha2code' => 'GP', |
| 604 |
'alpha3code' => 'GLP', |
| 605 |
], |
| 606 |
[ |
| 607 |
'name' => esc_attr__( 'Guam', 'fakerpress' ), |
| 608 |
'alpha2code' => 'GU', |
| 609 |
'alpha3code' => 'GUM', |
| 610 |
], |
| 611 |
[ |
| 612 |
'name' => esc_attr__( 'Guatemala', 'fakerpress' ), |
| 613 |
'alpha2code' => 'GT', |
| 614 |
'alpha3code' => 'GTM', |
| 615 |
], |
| 616 |
[ |
| 617 |
'name' => esc_attr__( 'Guernsey', 'fakerpress' ), |
| 618 |
'alpha2code' => 'GG', |
| 619 |
'alpha3code' => 'GGY', |
| 620 |
], |
| 621 |
[ |
| 622 |
'name' => esc_attr__( 'Guinea', 'fakerpress' ), |
| 623 |
'alpha2code' => 'GN', |
| 624 |
'alpha3code' => 'GIN', |
| 625 |
], |
| 626 |
[ |
| 627 |
'name' => esc_attr__( 'Guinea-Bissau', 'fakerpress' ), |
| 628 |
'alpha2code' => 'GW', |
| 629 |
'alpha3code' => 'GNB', |
| 630 |
], |
| 631 |
[ |
| 632 |
'name' => esc_attr__( 'Guyana', 'fakerpress' ), |
| 633 |
'alpha2code' => 'GY', |
| 634 |
'alpha3code' => 'GUY', |
| 635 |
], |
| 636 |
[ |
| 637 |
'name' => esc_attr__( 'Haiti', 'fakerpress' ), |
| 638 |
'alpha2code' => 'HT', |
| 639 |
'alpha3code' => 'HTI', |
| 640 |
], |
| 641 |
[ |
| 642 |
'name' => esc_attr__( 'Heard Island and McDonald Islands', 'fakerpress' ), |
| 643 |
'alpha2code' => 'HM', |
| 644 |
'alpha3code' => 'HMD', |
| 645 |
], |
| 646 |
[ |
| 647 |
'name' => esc_attr__( 'Honduras', 'fakerpress' ), |
| 648 |
'alpha2code' => 'HN', |
| 649 |
'alpha3code' => 'HND', |
| 650 |
], |
| 651 |
[ |
| 652 |
'name' => esc_attr__( 'Hong Kong', 'fakerpress' ), |
| 653 |
'alpha2code' => 'HK', |
| 654 |
'alpha3code' => 'HKG', |
| 655 |
], |
| 656 |
[ |
| 657 |
'name' => esc_attr__( 'Hungary', 'fakerpress' ), |
| 658 |
'alpha2code' => 'HU', |
| 659 |
'alpha3code' => 'HUN', |
| 660 |
], |
| 661 |
[ |
| 662 |
'name' => esc_attr__( 'Iceland', 'fakerpress' ), |
| 663 |
'alpha2code' => 'IS', |
| 664 |
'alpha3code' => 'ISL', |
| 665 |
], |
| 666 |
[ |
| 667 |
'name' => esc_attr__( 'India', 'fakerpress' ), |
| 668 |
'alpha2code' => 'IN', |
| 669 |
'alpha3code' => 'IND', |
| 670 |
], |
| 671 |
[ |
| 672 |
'name' => esc_attr__( 'Indonesia', 'fakerpress' ), |
| 673 |
'alpha2code' => 'ID', |
| 674 |
'alpha3code' => 'IDN', |
| 675 |
], |
| 676 |
[ |
| 677 |
'name' => esc_attr__( 'Ivory Coast', 'fakerpress' ), |
| 678 |
'alpha2code' => 'CI', |
| 679 |
'alpha3code' => 'CIV', |
| 680 |
], |
| 681 |
[ |
| 682 |
'name' => esc_attr__( 'Iran', 'fakerpress' ), |
| 683 |
'alpha2code' => 'IR', |
| 684 |
'alpha3code' => 'IRN', |
| 685 |
], |
| 686 |
[ |
| 687 |
'name' => esc_attr__( 'Iraq', 'fakerpress' ), |
| 688 |
'alpha2code' => 'IQ', |
| 689 |
'alpha3code' => 'IRQ', |
| 690 |
], |
| 691 |
[ |
| 692 |
'name' => esc_attr__( 'Republic of Ireland', 'fakerpress' ), |
| 693 |
'alpha2code' => 'IE', |
| 694 |
'alpha3code' => 'IRL', |
| 695 |
], |
| 696 |
[ |
| 697 |
'name' => esc_attr__( 'Isle of Man', 'fakerpress' ), |
| 698 |
'alpha2code' => 'IM', |
| 699 |
'alpha3code' => 'IMN', |
| 700 |
], |
| 701 |
[ |
| 702 |
'name' => esc_attr__( 'Israel', 'fakerpress' ), |
| 703 |
'alpha2code' => 'IL', |
| 704 |
'alpha3code' => 'ISR', |
| 705 |
], |
| 706 |
[ |
| 707 |
'name' => esc_attr__( 'Italy', 'fakerpress' ), |
| 708 |
'alpha2code' => 'IT', |
| 709 |
'alpha3code' => 'ITA', |
| 710 |
], |
| 711 |
[ |
| 712 |
'name' => esc_attr__( 'Jamaica', 'fakerpress' ), |
| 713 |
'alpha2code' => 'JM', |
| 714 |
'alpha3code' => 'JAM', |
| 715 |
], |
| 716 |
[ |
| 717 |
'name' => esc_attr__( 'Japan', 'fakerpress' ), |
| 718 |
'alpha2code' => 'JP', |
| 719 |
'alpha3code' => 'JPN', |
| 720 |
], |
| 721 |
[ |
| 722 |
'name' => esc_attr__( 'Jersey', 'fakerpress' ), |
| 723 |
'alpha2code' => 'JE', |
| 724 |
'alpha3code' => 'JEY', |
| 725 |
], |
| 726 |
[ |
| 727 |
'name' => esc_attr__( 'Jordan', 'fakerpress' ), |
| 728 |
'alpha2code' => 'JO', |
| 729 |
'alpha3code' => 'JOR', |
| 730 |
], |
| 731 |
[ |
| 732 |
'name' => esc_attr__( 'Kazakhstan', 'fakerpress' ), |
| 733 |
'alpha2code' => 'KZ', |
| 734 |
'alpha3code' => 'KAZ', |
| 735 |
], |
| 736 |
[ |
| 737 |
'name' => esc_attr__( 'Kenya', 'fakerpress' ), |
| 738 |
'alpha2code' => 'KE', |
| 739 |
'alpha3code' => 'KEN', |
| 740 |
], |
| 741 |
[ |
| 742 |
'name' => esc_attr__( 'Kiribati', 'fakerpress' ), |
| 743 |
'alpha2code' => 'KI', |
| 744 |
'alpha3code' => 'KIR', |
| 745 |
], |
| 746 |
[ |
| 747 |
'name' => esc_attr__( 'Kuwait', 'fakerpress' ), |
| 748 |
'alpha2code' => 'KW', |
| 749 |
'alpha3code' => 'KWT', |
| 750 |
], |
| 751 |
[ |
| 752 |
'name' => esc_attr__( 'Kyrgyzstan', 'fakerpress' ), |
| 753 |
'alpha2code' => 'KG', |
| 754 |
'alpha3code' => 'KGZ', |
| 755 |
], |
| 756 |
[ |
| 757 |
'name' => esc_attr__( 'Laos', 'fakerpress' ), |
| 758 |
'alpha2code' => 'LA', |
| 759 |
'alpha3code' => 'LAO', |
| 760 |
], |
| 761 |
[ |
| 762 |
'name' => esc_attr__( 'Latvia', 'fakerpress' ), |
| 763 |
'alpha2code' => 'LV', |
| 764 |
'alpha3code' => 'LVA', |
| 765 |
], |
| 766 |
[ |
| 767 |
'name' => esc_attr__( 'Lebanon', 'fakerpress' ), |
| 768 |
'alpha2code' => 'LB', |
| 769 |
'alpha3code' => 'LBN', |
| 770 |
], |
| 771 |
[ |
| 772 |
'name' => esc_attr__( 'Lesotho', 'fakerpress' ), |
| 773 |
'alpha2code' => 'LS', |
| 774 |
'alpha3code' => 'LSO', |
| 775 |
], |
| 776 |
[ |
| 777 |
'name' => esc_attr__( 'Liberia', 'fakerpress' ), |
| 778 |
'alpha2code' => 'LR', |
| 779 |
'alpha3code' => 'LBR', |
| 780 |
], |
| 781 |
[ |
| 782 |
'name' => esc_attr__( 'Libya', 'fakerpress' ), |
| 783 |
'alpha2code' => 'LY', |
| 784 |
'alpha3code' => 'LBY', |
| 785 |
], |
| 786 |
[ |
| 787 |
'name' => esc_attr__( 'Liechtenstein', 'fakerpress' ), |
| 788 |
'alpha2code' => 'LI', |
| 789 |
'alpha3code' => 'LIE', |
| 790 |
], |
| 791 |
[ |
| 792 |
'name' => esc_attr__( 'Lithuania', 'fakerpress' ), |
| 793 |
'alpha2code' => 'LT', |
| 794 |
'alpha3code' => 'LTU', |
| 795 |
], |
| 796 |
[ |
| 797 |
'name' => esc_attr__( 'Luxembourg', 'fakerpress' ), |
| 798 |
'alpha2code' => 'LU', |
| 799 |
'alpha3code' => 'LUX', |
| 800 |
], |
| 801 |
[ |
| 802 |
'name' => esc_attr__( 'Macau', 'fakerpress' ), |
| 803 |
'alpha2code' => 'MO', |
| 804 |
'alpha3code' => 'MAC', |
| 805 |
], |
| 806 |
[ |
| 807 |
'name' => esc_attr__( 'Republic of Macedonia', 'fakerpress' ), |
| 808 |
'alpha2code' => 'MK', |
| 809 |
'alpha3code' => 'MKD', |
| 810 |
], |
| 811 |
[ |
| 812 |
'name' => esc_attr__( 'Madagascar', 'fakerpress' ), |
| 813 |
'alpha2code' => 'MG', |
| 814 |
'alpha3code' => 'MDG', |
| 815 |
], |
| 816 |
[ |
| 817 |
'name' => esc_attr__( 'Malawi', 'fakerpress' ), |
| 818 |
'alpha2code' => 'MW', |
| 819 |
'alpha3code' => 'MWI', |
| 820 |
], |
| 821 |
[ |
| 822 |
'name' => esc_attr__( 'Malaysia', 'fakerpress' ), |
| 823 |
'alpha2code' => 'MY', |
| 824 |
'alpha3code' => 'MYS', |
| 825 |
], |
| 826 |
[ |
| 827 |
'name' => esc_attr__( 'Maldives', 'fakerpress' ), |
| 828 |
'alpha2code' => 'MV', |
| 829 |
'alpha3code' => 'MDV', |
| 830 |
], |
| 831 |
[ |
| 832 |
'name' => esc_attr__( 'Mali', 'fakerpress' ), |
| 833 |
'alpha2code' => 'ML', |
| 834 |
'alpha3code' => 'MLI', |
| 835 |
], |
| 836 |
[ |
| 837 |
'name' => esc_attr__( 'Malta', 'fakerpress' ), |
| 838 |
'alpha2code' => 'MT', |
| 839 |
'alpha3code' => 'MLT', |
| 840 |
], |
| 841 |
[ |
| 842 |
'name' => esc_attr__( 'Marshall Islands', 'fakerpress' ), |
| 843 |
'alpha2code' => 'MH', |
| 844 |
'alpha3code' => 'MHL', |
| 845 |
], |
| 846 |
[ |
| 847 |
'name' => esc_attr__( 'Martinique', 'fakerpress' ), |
| 848 |
'alpha2code' => 'MQ', |
| 849 |
'alpha3code' => 'MTQ', |
| 850 |
], |
| 851 |
[ |
| 852 |
'name' => esc_attr__( 'Mauritania', 'fakerpress' ), |
| 853 |
'alpha2code' => 'MR', |
| 854 |
'alpha3code' => 'MRT', |
| 855 |
], |
| 856 |
[ |
| 857 |
'name' => esc_attr__( 'Mauritius', 'fakerpress' ), |
| 858 |
'alpha2code' => 'MU', |
| 859 |
'alpha3code' => 'MUS', |
| 860 |
], |
| 861 |
[ |
| 862 |
'name' => esc_attr__( 'Mayotte', 'fakerpress' ), |
| 863 |
'alpha2code' => 'YT', |
| 864 |
'alpha3code' => 'MYT', |
| 865 |
], |
| 866 |
[ |
| 867 |
'name' => esc_attr__( 'Mexico', 'fakerpress' ), |
| 868 |
'alpha2code' => 'MX', |
| 869 |
'alpha3code' => 'MEX', |
| 870 |
], |
| 871 |
[ |
| 872 |
'name' => esc_attr__( 'Federated States of Micronesia', 'fakerpress' ), |
| 873 |
'alpha2code' => 'FM', |
| 874 |
'alpha3code' => 'FSM', |
| 875 |
], |
| 876 |
[ |
| 877 |
'name' => esc_attr__( 'Moldova', 'fakerpress' ), |
| 878 |
'alpha2code' => 'MD', |
| 879 |
'alpha3code' => 'MDA', |
| 880 |
], |
| 881 |
[ |
| 882 |
'name' => esc_attr__( 'Monaco', 'fakerpress' ), |
| 883 |
'alpha2code' => 'MC', |
| 884 |
'alpha3code' => 'MCO', |
| 885 |
], |
| 886 |
[ |
| 887 |
'name' => esc_attr__( 'Mongolia', 'fakerpress' ), |
| 888 |
'alpha2code' => 'MN', |
| 889 |
'alpha3code' => 'MNG', |
| 890 |
], |
| 891 |
[ |
| 892 |
'name' => esc_attr__( 'Montenegro', 'fakerpress' ), |
| 893 |
'alpha2code' => 'ME', |
| 894 |
'alpha3code' => 'MNE', |
| 895 |
], |
| 896 |
[ |
| 897 |
'name' => esc_attr__( 'Montserrat', 'fakerpress' ), |
| 898 |
'alpha2code' => 'MS', |
| 899 |
'alpha3code' => 'MSR', |
| 900 |
], |
| 901 |
[ |
| 902 |
'name' => esc_attr__( 'Morocco', 'fakerpress' ), |
| 903 |
'alpha2code' => 'MA', |
| 904 |
'alpha3code' => 'MAR', |
| 905 |
], |
| 906 |
[ |
| 907 |
'name' => esc_attr__( 'Mozambique', 'fakerpress' ), |
| 908 |
'alpha2code' => 'MZ', |
| 909 |
'alpha3code' => 'MOZ', |
| 910 |
], |
| 911 |
[ |
| 912 |
'name' => esc_attr__( 'Myanmar', 'fakerpress' ), |
| 913 |
'alpha2code' => 'MM', |
| 914 |
'alpha3code' => 'MMR', |
| 915 |
], |
| 916 |
[ |
| 917 |
'name' => esc_attr__( 'Namibia', 'fakerpress' ), |
| 918 |
'alpha2code' => 'NA', |
| 919 |
'alpha3code' => 'NAM', |
| 920 |
], |
| 921 |
[ |
| 922 |
'name' => esc_attr__( 'Nauru', 'fakerpress' ), |
| 923 |
'alpha2code' => 'NR', |
| 924 |
'alpha3code' => 'NRU', |
| 925 |
], |
| 926 |
[ |
| 927 |
'name' => esc_attr__( 'Nepal', 'fakerpress' ), |
| 928 |
'alpha2code' => 'NP', |
| 929 |
'alpha3code' => 'NPL', |
| 930 |
], |
| 931 |
[ |
| 932 |
'name' => esc_attr__( 'Netherlands', 'fakerpress' ), |
| 933 |
'alpha2code' => 'NL', |
| 934 |
'alpha3code' => 'NLD', |
| 935 |
], |
| 936 |
[ |
| 937 |
'name' => esc_attr__( 'New Caledonia', 'fakerpress' ), |
| 938 |
'alpha2code' => 'NC', |
| 939 |
'alpha3code' => 'NCL', |
| 940 |
], |
| 941 |
[ |
| 942 |
'name' => esc_attr__( 'New Zealand', 'fakerpress' ), |
| 943 |
'alpha2code' => 'NZ', |
| 944 |
'alpha3code' => 'NZL', |
| 945 |
], |
| 946 |
[ |
| 947 |
'name' => esc_attr__( 'Nicaragua', 'fakerpress' ), |
| 948 |
'alpha2code' => 'NI', |
| 949 |
'alpha3code' => 'NIC', |
| 950 |
], |
| 951 |
[ |
| 952 |
'name' => esc_attr__( 'Niger', 'fakerpress' ), |
| 953 |
'alpha2code' => 'NE', |
| 954 |
'alpha3code' => 'NER', |
| 955 |
], |
| 956 |
[ |
| 957 |
'name' => esc_attr__( 'Nigeria', 'fakerpress' ), |
| 958 |
'alpha2code' => 'NG', |
| 959 |
'alpha3code' => 'NGA', |
| 960 |
], |
| 961 |
[ |
| 962 |
'name' => esc_attr__( 'Niue', 'fakerpress' ), |
| 963 |
'alpha2code' => 'NU', |
| 964 |
'alpha3code' => 'NIU', |
| 965 |
], |
| 966 |
[ |
| 967 |
'name' => esc_attr__( 'Norfolk Island', 'fakerpress' ), |
| 968 |
'alpha2code' => 'NF', |
| 969 |
'alpha3code' => 'NFK', |
| 970 |
], |
| 971 |
[ |
| 972 |
'name' => esc_attr__( 'North Korea', 'fakerpress' ), |
| 973 |
'alpha2code' => 'KP', |
| 974 |
'alpha3code' => 'PRK', |
| 975 |
], |
| 976 |
[ |
| 977 |
'name' => esc_attr__( 'Northern Mariana Islands', 'fakerpress' ), |
| 978 |
'alpha2code' => 'MP', |
| 979 |
'alpha3code' => 'MNP', |
| 980 |
], |
| 981 |
[ |
| 982 |
'name' => esc_attr__( 'Norway', 'fakerpress' ), |
| 983 |
'alpha2code' => 'NO', |
| 984 |
'alpha3code' => 'NOR', |
| 985 |
], |
| 986 |
[ |
| 987 |
'name' => esc_attr__( 'Oman', 'fakerpress' ), |
| 988 |
'alpha2code' => 'OM', |
| 989 |
'alpha3code' => 'OMN', |
| 990 |
], |
| 991 |
[ |
| 992 |
'name' => esc_attr__( 'Pakistan', 'fakerpress' ), |
| 993 |
'alpha2code' => 'PK', |
| 994 |
'alpha3code' => 'PAK', |
| 995 |
], |
| 996 |
[ |
| 997 |
'name' => esc_attr__( 'Palau', 'fakerpress' ), |
| 998 |
'alpha2code' => 'PW', |
| 999 |
'alpha3code' => 'PLW', |
| 1000 |
], |
| 1001 |
[ |
| 1002 |
'name' => esc_attr__( 'Palestine', 'fakerpress' ), |
| 1003 |
'alpha2code' => 'PS', |
| 1004 |
'alpha3code' => 'PSE', |
| 1005 |
], |
| 1006 |
[ |
| 1007 |
'name' => esc_attr__( 'Panama', 'fakerpress' ), |
| 1008 |
'alpha2code' => 'PA', |
| 1009 |
'alpha3code' => 'PAN', |
| 1010 |
], |
| 1011 |
[ |
| 1012 |
'name' => esc_attr__( 'Papua New Guinea', 'fakerpress' ), |
| 1013 |
'alpha2code' => 'PG', |
| 1014 |
'alpha3code' => 'PNG', |
| 1015 |
], |
| 1016 |
[ |
| 1017 |
'name' => esc_attr__( 'Paraguay', 'fakerpress' ), |
| 1018 |
'alpha2code' => 'PY', |
| 1019 |
'alpha3code' => 'PRY', |
| 1020 |
], |
| 1021 |
[ |
| 1022 |
'name' => esc_attr__( 'Peru', 'fakerpress' ), |
| 1023 |
'alpha2code' => 'PE', |
| 1024 |
'alpha3code' => 'PER', |
| 1025 |
], |
| 1026 |
[ |
| 1027 |
'name' => esc_attr__( 'Philippines', 'fakerpress' ), |
| 1028 |
'alpha2code' => 'PH', |
| 1029 |
'alpha3code' => 'PHL', |
| 1030 |
], |
| 1031 |
[ |
| 1032 |
'name' => esc_attr__( 'Pitcairn Islands', 'fakerpress' ), |
| 1033 |
'alpha2code' => 'PN', |
| 1034 |
'alpha3code' => 'PCN', |
| 1035 |
], |
| 1036 |
[ |
| 1037 |
'name' => esc_attr__( 'Poland', 'fakerpress' ), |
| 1038 |
'alpha2code' => 'PL', |
| 1039 |
'alpha3code' => 'POL', |
| 1040 |
], |
| 1041 |
[ |
| 1042 |
'name' => esc_attr__( 'Portugal', 'fakerpress' ), |
| 1043 |
'alpha2code' => 'PT', |
| 1044 |
'alpha3code' => 'PRT', |
| 1045 |
], |
| 1046 |
[ |
| 1047 |
'name' => esc_attr__( 'Puerto Rico', 'fakerpress' ), |
| 1048 |
'alpha2code' => 'PR', |
| 1049 |
'alpha3code' => 'PRI', |
| 1050 |
], |
| 1051 |
[ |
| 1052 |
'name' => esc_attr__( 'Qatar', 'fakerpress' ), |
| 1053 |
'alpha2code' => 'QA', |
| 1054 |
'alpha3code' => 'QAT', |
| 1055 |
], |
| 1056 |
[ |
| 1057 |
'name' => esc_attr__( 'Republic of Kosovo', 'fakerpress' ), |
| 1058 |
'alpha2code' => 'XK', |
| 1059 |
'alpha3code' => 'KOS', |
| 1060 |
], |
| 1061 |
[ |
| 1062 |
'name' => esc_attr__( 'Réunion', 'fakerpress' ), |
| 1063 |
'alpha2code' => 'RE', |
| 1064 |
'alpha3code' => 'REU', |
| 1065 |
], |
| 1066 |
[ |
| 1067 |
'name' => esc_attr__( 'Romania', 'fakerpress' ), |
| 1068 |
'alpha2code' => 'RO', |
| 1069 |
'alpha3code' => 'ROU', |
| 1070 |
], |
| 1071 |
[ |
| 1072 |
'name' => esc_attr__( 'Russia', 'fakerpress' ), |
| 1073 |
'alpha2code' => 'RU', |
| 1074 |
'alpha3code' => 'RUS', |
| 1075 |
], |
| 1076 |
[ |
| 1077 |
'name' => esc_attr__( 'Rwanda', 'fakerpress' ), |
| 1078 |
'alpha2code' => 'RW', |
| 1079 |
'alpha3code' => 'RWA', |
| 1080 |
], |
| 1081 |
[ |
| 1082 |
'name' => esc_attr__( 'Saint Barthélemy', 'fakerpress' ), |
| 1083 |
'alpha2code' => 'BL', |
| 1084 |
'alpha3code' => 'BLM', |
| 1085 |
], |
| 1086 |
[ |
| 1087 |
'name' => esc_attr__( 'Saint Helena', 'fakerpress' ), |
| 1088 |
'alpha2code' => 'SH', |
| 1089 |
'alpha3code' => 'SHN', |
| 1090 |
], |
| 1091 |
[ |
| 1092 |
'name' => esc_attr__( 'Saint Kitts and Nevis', 'fakerpress' ), |
| 1093 |
'alpha2code' => 'KN', |
| 1094 |
'alpha3code' => 'KNA', |
| 1095 |
], |
| 1096 |
[ |
| 1097 |
'name' => esc_attr__( 'Saint Lucia', 'fakerpress' ), |
| 1098 |
'alpha2code' => 'LC', |
| 1099 |
'alpha3code' => 'LCA', |
| 1100 |
], |
| 1101 |
[ |
| 1102 |
'name' => esc_attr__( 'Saint Martin', 'fakerpress' ), |
| 1103 |
'alpha2code' => 'MF', |
| 1104 |
'alpha3code' => 'MAF', |
| 1105 |
], |
| 1106 |
[ |
| 1107 |
'name' => esc_attr__( 'Saint Pierre and Miquelon', 'fakerpress' ), |
| 1108 |
'alpha2code' => 'PM', |
| 1109 |
'alpha3code' => 'SPM', |
| 1110 |
], |
| 1111 |
[ |
| 1112 |
'name' => esc_attr__( 'Saint Vincent and the Grenadines', 'fakerpress' ), |
| 1113 |
'alpha2code' => 'VC', |
| 1114 |
'alpha3code' => 'VCT', |
| 1115 |
], |
| 1116 |
[ |
| 1117 |
'name' => esc_attr__( 'Samoa', 'fakerpress' ), |
| 1118 |
'alpha2code' => 'WS', |
| 1119 |
'alpha3code' => 'WSM', |
| 1120 |
], |
| 1121 |
[ |
| 1122 |
'name' => esc_attr__( 'San Marino', 'fakerpress' ), |
| 1123 |
'alpha2code' => 'SM', |
| 1124 |
'alpha3code' => 'SMR', |
| 1125 |
], |
| 1126 |
[ |
| 1127 |
'name' => esc_attr__( 'São Tomé and PrÃncipe', 'fakerpress' ), |
| 1128 |
'alpha2code' => 'ST', |
| 1129 |
'alpha3code' => 'STP', |
| 1130 |
], |
| 1131 |
[ |
| 1132 |
'name' => esc_attr__( 'Saudi Arabia', 'fakerpress' ), |
| 1133 |
'alpha2code' => 'SA', |
| 1134 |
'alpha3code' => 'SAU', |
| 1135 |
], |
| 1136 |
[ |
| 1137 |
'name' => esc_attr__( 'Senegal', 'fakerpress' ), |
| 1138 |
'alpha2code' => 'SN', |
| 1139 |
'alpha3code' => 'SEN', |
| 1140 |
], |
| 1141 |
[ |
| 1142 |
'name' => esc_attr__( 'Serbia', 'fakerpress' ), |
| 1143 |
'alpha2code' => 'RS', |
| 1144 |
'alpha3code' => 'SRB', |
| 1145 |
], |
| 1146 |
[ |
| 1147 |
'name' => esc_attr__( 'Seychelles', 'fakerpress' ), |
| 1148 |
'alpha2code' => 'SC', |
| 1149 |
'alpha3code' => 'SYC', |
| 1150 |
], |
| 1151 |
[ |
| 1152 |
'name' => esc_attr__( 'Sierra Leone', 'fakerpress' ), |
| 1153 |
'alpha2code' => 'SL', |
| 1154 |
'alpha3code' => 'SLE', |
| 1155 |
], |
| 1156 |
[ |
| 1157 |
'name' => esc_attr__( 'Singapore', 'fakerpress' ), |
| 1158 |
'alpha2code' => 'SG', |
| 1159 |
'alpha3code' => 'SGP', |
| 1160 |
], |
| 1161 |
[ |
| 1162 |
'name' => esc_attr__( 'Sint Maarten', 'fakerpress' ), |
| 1163 |
'alpha2code' => 'SX', |
| 1164 |
'alpha3code' => 'SXM', |
| 1165 |
], |
| 1166 |
[ |
| 1167 |
'name' => esc_attr__( 'Slovakia', 'fakerpress' ), |
| 1168 |
'alpha2code' => 'SK', |
| 1169 |
'alpha3code' => 'SVK', |
| 1170 |
], |
| 1171 |
[ |
| 1172 |
'name' => esc_attr__( 'Slovenia', 'fakerpress' ), |
| 1173 |
'alpha2code' => 'SI', |
| 1174 |
'alpha3code' => 'SVN', |
| 1175 |
], |
| 1176 |
[ |
| 1177 |
'name' => esc_attr__( 'Solomon Islands', 'fakerpress' ), |
| 1178 |
'alpha2code' => 'SB', |
| 1179 |
'alpha3code' => 'SLB', |
| 1180 |
], |
| 1181 |
[ |
| 1182 |
'name' => esc_attr__( 'Somalia', 'fakerpress' ), |
| 1183 |
'alpha2code' => 'SO', |
| 1184 |
'alpha3code' => 'SOM', |
| 1185 |
], |
| 1186 |
[ |
| 1187 |
'name' => esc_attr__( 'South Africa', 'fakerpress' ), |
| 1188 |
'alpha2code' => 'ZA', |
| 1189 |
'alpha3code' => 'ZAF', |
| 1190 |
], |
| 1191 |
[ |
| 1192 |
'name' => esc_attr__( 'South Georgia', 'fakerpress' ), |
| 1193 |
'alpha2code' => 'GS', |
| 1194 |
'alpha3code' => 'SGS', |
| 1195 |
], |
| 1196 |
[ |
| 1197 |
'name' => esc_attr__( 'South Korea', 'fakerpress' ), |
| 1198 |
'alpha2code' => 'KR', |
| 1199 |
'alpha3code' => 'KOR', |
| 1200 |
], |
| 1201 |
[ |
| 1202 |
'name' => esc_attr__( 'South Sudan', 'fakerpress' ), |
| 1203 |
'alpha2code' => 'SS', |
| 1204 |
'alpha3code' => 'SSD', |
| 1205 |
], |
| 1206 |
[ |
| 1207 |
'name' => esc_attr__( 'Spain', 'fakerpress' ), |
| 1208 |
'alpha2code' => 'ES', |
| 1209 |
'alpha3code' => 'ESP', |
| 1210 |
], |
| 1211 |
[ |
| 1212 |
'name' => esc_attr__( 'Sri Lanka', 'fakerpress' ), |
| 1213 |
'alpha2code' => 'LK', |
| 1214 |
'alpha3code' => 'LKA', |
| 1215 |
], |
| 1216 |
[ |
| 1217 |
'name' => esc_attr__( 'Sudan', 'fakerpress' ), |
| 1218 |
'alpha2code' => 'SD', |
| 1219 |
'alpha3code' => 'SDN', |
| 1220 |
], |
| 1221 |
[ |
| 1222 |
'name' => esc_attr__( 'Suriname', 'fakerpress' ), |
| 1223 |
'alpha2code' => 'SR', |
| 1224 |
'alpha3code' => 'SUR', |
| 1225 |
], |
| 1226 |
[ |
| 1227 |
'name' => esc_attr__( 'Svalbard and Jan Mayen', 'fakerpress' ), |
| 1228 |
'alpha2code' => 'SJ', |
| 1229 |
'alpha3code' => 'SJM', |
| 1230 |
], |
| 1231 |
[ |
| 1232 |
'name' => esc_attr__( 'Swaziland', 'fakerpress' ), |
| 1233 |
'alpha2code' => 'SZ', |
| 1234 |
'alpha3code' => 'SWZ', |
| 1235 |
], |
| 1236 |
[ |
| 1237 |
'name' => esc_attr__( 'Sweden', 'fakerpress' ), |
| 1238 |
'alpha2code' => 'SE', |
| 1239 |
'alpha3code' => 'SWE', |
| 1240 |
], |
| 1241 |
[ |
| 1242 |
'name' => esc_attr__( 'Switzerland', 'fakerpress' ), |
| 1243 |
'alpha2code' => 'CH', |
| 1244 |
'alpha3code' => 'CHE', |
| 1245 |
], |
| 1246 |
[ |
| 1247 |
'name' => esc_attr__( 'Syria', 'fakerpress' ), |
| 1248 |
'alpha2code' => 'SY', |
| 1249 |
'alpha3code' => 'SYR', |
| 1250 |
], |
| 1251 |
[ |
| 1252 |
'name' => esc_attr__( 'Taiwan', 'fakerpress' ), |
| 1253 |
'alpha2code' => 'TW', |
| 1254 |
'alpha3code' => 'TWN', |
| 1255 |
], |
| 1256 |
[ |
| 1257 |
'name' => esc_attr__( 'Tajikistan', 'fakerpress' ), |
| 1258 |
'alpha2code' => 'TJ', |
| 1259 |
'alpha3code' => 'TJK', |
| 1260 |
], |
| 1261 |
[ |
| 1262 |
'name' => esc_attr__( 'Tanzania', 'fakerpress' ), |
| 1263 |
'alpha2code' => 'TZ', |
| 1264 |
'alpha3code' => 'TZA', |
| 1265 |
], |
| 1266 |
[ |
| 1267 |
'name' => esc_attr__( 'Thailand', 'fakerpress' ), |
| 1268 |
'alpha2code' => 'TH', |
| 1269 |
'alpha3code' => 'THA', |
| 1270 |
], |
| 1271 |
[ |
| 1272 |
'name' => esc_attr__( 'East Timor', 'fakerpress' ), |
| 1273 |
'alpha2code' => 'TL', |
| 1274 |
'alpha3code' => 'TLS', |
| 1275 |
], |
| 1276 |
[ |
| 1277 |
'name' => esc_attr__( 'Togo', 'fakerpress' ), |
| 1278 |
'alpha2code' => 'TG', |
| 1279 |
'alpha3code' => 'TGO', |
| 1280 |
], |
| 1281 |
[ |
| 1282 |
'name' => esc_attr__( 'Tokelau', 'fakerpress' ), |
| 1283 |
'alpha2code' => 'TK', |
| 1284 |
'alpha3code' => 'TKL', |
| 1285 |
], |
| 1286 |
[ |
| 1287 |
'name' => esc_attr__( 'Tonga', 'fakerpress' ), |
| 1288 |
'alpha2code' => 'TO', |
| 1289 |
'alpha3code' => 'TON', |
| 1290 |
], |
| 1291 |
[ |
| 1292 |
'name' => esc_attr__( 'Trinidad and Tobago', 'fakerpress' ), |
| 1293 |
'alpha2code' => 'TT', |
| 1294 |
'alpha3code' => 'TTO', |
| 1295 |
], |
| 1296 |
[ |
| 1297 |
'name' => esc_attr__( 'Tunisia', 'fakerpress' ), |
| 1298 |
'alpha2code' => 'TN', |
| 1299 |
'alpha3code' => 'TUN', |
| 1300 |
], |
| 1301 |
[ |
| 1302 |
'name' => esc_attr__( 'Turkey', 'fakerpress' ), |
| 1303 |
'alpha2code' => 'TR', |
| 1304 |
'alpha3code' => 'TUR', |
| 1305 |
], |
| 1306 |
[ |
| 1307 |
'name' => esc_attr__( 'Turkmenistan', 'fakerpress' ), |
| 1308 |
'alpha2code' => 'TM', |
| 1309 |
'alpha3code' => 'TKM', |
| 1310 |
], |
| 1311 |
[ |
| 1312 |
'name' => esc_attr__( 'Turks and Caicos Islands', 'fakerpress' ), |
| 1313 |
'alpha2code' => 'TC', |
| 1314 |
'alpha3code' => 'TCA', |
| 1315 |
], |
| 1316 |
[ |
| 1317 |
'name' => esc_attr__( 'Tuvalu', 'fakerpress' ), |
| 1318 |
'alpha2code' => 'TV', |
| 1319 |
'alpha3code' => 'TUV', |
| 1320 |
], |
| 1321 |
[ |
| 1322 |
'name' => esc_attr__( 'Uganda', 'fakerpress' ), |
| 1323 |
'alpha2code' => 'UG', |
| 1324 |
'alpha3code' => 'UGA', |
| 1325 |
], |
| 1326 |
[ |
| 1327 |
'name' => esc_attr__( 'Ukraine', 'fakerpress' ), |
| 1328 |
'alpha2code' => 'UA', |
| 1329 |
'alpha3code' => 'UKR', |
| 1330 |
], |
| 1331 |
[ |
| 1332 |
'name' => esc_attr__( 'United Arab Emirates', 'fakerpress' ), |
| 1333 |
'alpha2code' => 'AE', |
| 1334 |
'alpha3code' => 'ARE', |
| 1335 |
], |
| 1336 |
[ |
| 1337 |
'name' => esc_attr__( 'United Kingdom', 'fakerpress' ), |
| 1338 |
'alpha2code' => 'GB', |
| 1339 |
'alpha3code' => 'GBR', |
| 1340 |
], |
| 1341 |
[ |
| 1342 |
'name' => esc_attr__( 'United States', 'fakerpress' ), |
| 1343 |
'alpha2code' => 'US', |
| 1344 |
'alpha3code' => 'USA', |
| 1345 |
], |
| 1346 |
[ |
| 1347 |
'name' => esc_attr__( 'Uruguay', 'fakerpress' ), |
| 1348 |
'alpha2code' => 'UY', |
| 1349 |
'alpha3code' => 'URY', |
| 1350 |
], |
| 1351 |
[ |
| 1352 |
'name' => esc_attr__( 'Uzbekistan', 'fakerpress' ), |
| 1353 |
'alpha2code' => 'UZ', |
| 1354 |
'alpha3code' => 'UZB', |
| 1355 |
], |
| 1356 |
[ |
| 1357 |
'name' => esc_attr__( 'Vanuatu', 'fakerpress' ), |
| 1358 |
'alpha2code' => 'VU', |
| 1359 |
'alpha3code' => 'VUT', |
| 1360 |
], |
| 1361 |
[ |
| 1362 |
'name' => esc_attr__( 'Venezuela', 'fakerpress' ), |
| 1363 |
'alpha2code' => 'VE', |
| 1364 |
'alpha3code' => 'VEN', |
| 1365 |
], |
| 1366 |
[ |
| 1367 |
'name' => esc_attr__( 'Vietnam', 'fakerpress' ), |
| 1368 |
'alpha2code' => 'VN', |
| 1369 |
'alpha3code' => 'VNM', |
| 1370 |
], |
| 1371 |
[ |
| 1372 |
'name' => esc_attr__( 'Wallis and Futuna', 'fakerpress' ), |
| 1373 |
'alpha2code' => 'WF', |
| 1374 |
'alpha3code' => 'WLF', |
| 1375 |
], |
| 1376 |
[ |
| 1377 |
'name' => esc_attr__( 'Western Sahara', 'fakerpress' ), |
| 1378 |
'alpha2code' => 'EH', |
| 1379 |
'alpha3code' => 'ESH', |
| 1380 |
], |
| 1381 |
[ |
| 1382 |
'name' => esc_attr__( 'Yemen', 'fakerpress' ), |
| 1383 |
'alpha2code' => 'YE', |
| 1384 |
'alpha3code' => 'YEM', |
| 1385 |
], |
| 1386 |
[ |
| 1387 |
'name' => esc_attr__( 'Zambia', 'fakerpress' ), |
| 1388 |
'alpha2code' => 'ZM', |
| 1389 |
'alpha3code' => 'ZMB', |
| 1390 |
], |
| 1391 |
[ |
| 1392 |
'name' => esc_attr__( 'Zimbabwe', 'fakerpress' ), |
| 1393 |
'alpha2code' => 'ZW', |
| 1394 |
'alpha3code' => 'ZWE', |
| 1395 |
], |
| 1396 |
]; |
| 1397 |
|
| 1398 |
foreach ( $countries as $index => $country ) { |
| 1399 |
if ( $country['name'] === $country_name && ! empty( $country[ 'alpha' . $type . 'code' ] ) ) { |
| 1400 |
$code = $country[ 'alpha' . $type . 'code' ]; |
| 1401 |
break; |
| 1402 |
} |
| 1403 |
} |
| 1404 |
|
| 1405 |
return $code; |
| 1406 |
} |
| 1407 |
} |
| 1408 |
|