1965 lines
53 KiB
PHP
1965 lines
53 KiB
PHP
|
<?php
|
||
|
/**
|
||
|
* Country Functions
|
||
|
*
|
||
|
* @package EDD
|
||
|
* @subpackage Functions
|
||
|
* @copyright Copyright (c) 2018, Easy Digital Downloads, LLC
|
||
|
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
|
||
|
* @since 1.6
|
||
|
*/
|
||
|
|
||
|
// Exit if accessed directly
|
||
|
defined( 'ABSPATH' ) || exit;
|
||
|
|
||
|
|
||
|
/**
|
||
|
* Get Shop Base Country
|
||
|
*
|
||
|
* @since 1.6
|
||
|
* @return string $country The two letter country code for the shop's base country
|
||
|
*/
|
||
|
function edd_get_shop_country() {
|
||
|
$country = edd_get_option( 'base_country', 'US' );
|
||
|
|
||
|
return apply_filters( 'edd_shop_country', $country );
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Get Shop Base State
|
||
|
*
|
||
|
* @since 1.6
|
||
|
* @return string $state The shop's base state name
|
||
|
*/
|
||
|
function edd_get_shop_state() {
|
||
|
$state = edd_get_option( 'base_state', false );
|
||
|
|
||
|
return apply_filters( 'edd_shop_state', $state );
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Get Shop States
|
||
|
*
|
||
|
* @since 1.6
|
||
|
*
|
||
|
* @param string $country
|
||
|
* @return array A list of states for the selected country
|
||
|
*/
|
||
|
function edd_get_shop_states( $country = null ) {
|
||
|
if( empty( $country ) )
|
||
|
$country = edd_get_shop_country();
|
||
|
|
||
|
switch( $country ) :
|
||
|
|
||
|
case 'US' :
|
||
|
$states = edd_get_states_list();
|
||
|
break;
|
||
|
case 'AO' :
|
||
|
$states = edd_get_angola_provinces_list();
|
||
|
break;
|
||
|
case 'CA' :
|
||
|
$states = edd_get_provinces_list();
|
||
|
break;
|
||
|
case 'AU' :
|
||
|
$states = edd_get_australian_states_list();
|
||
|
break;
|
||
|
case 'BD' :
|
||
|
$states = edd_get_bangladeshi_states_list();
|
||
|
break;
|
||
|
case 'BG' :
|
||
|
$states = edd_get_bulgarian_states_list();
|
||
|
break;
|
||
|
case 'BR' :
|
||
|
$states = edd_get_brazil_states_list();
|
||
|
break;
|
||
|
case 'CN' :
|
||
|
$states = edd_get_chinese_states_list();
|
||
|
break;
|
||
|
case 'GB' :
|
||
|
$states = edd_get_united_kingdom_states_list();
|
||
|
break;
|
||
|
case 'HK' :
|
||
|
$states = edd_get_hong_kong_states_list();
|
||
|
break;
|
||
|
case 'HU' :
|
||
|
$states = edd_get_hungary_states_list();
|
||
|
break;
|
||
|
case 'ID' :
|
||
|
$states = edd_get_indonesian_states_list();
|
||
|
break;
|
||
|
case 'IN' :
|
||
|
$states = edd_get_indian_states_list();
|
||
|
break;
|
||
|
case 'IR' :
|
||
|
$states = edd_get_iranian_states_list();
|
||
|
break;
|
||
|
case 'IT' :
|
||
|
$states = edd_get_italian_states_list();
|
||
|
break;
|
||
|
case 'JP' :
|
||
|
$states = edd_get_japanese_states_list();
|
||
|
break;
|
||
|
case 'MX' :
|
||
|
$states = edd_get_mexican_states_list();
|
||
|
break;
|
||
|
case 'MY' :
|
||
|
$states = edd_get_malaysian_states_list();
|
||
|
break;
|
||
|
case 'NL' :
|
||
|
$states = edd_get_netherlands_provinces_list();
|
||
|
break;
|
||
|
case 'NP' :
|
||
|
$states = edd_get_nepalese_states_list();
|
||
|
break;
|
||
|
case 'NZ' :
|
||
|
$states = edd_get_new_zealand_states_list();
|
||
|
break;
|
||
|
case 'PE' :
|
||
|
$states = edd_get_peruvian_states_list();
|
||
|
break;
|
||
|
case 'TH' :
|
||
|
$states = edd_get_thailand_states_list();
|
||
|
break;
|
||
|
case 'TR' :
|
||
|
$states = edd_get_turkey_states_list();
|
||
|
break;
|
||
|
case 'ZA' :
|
||
|
$states = edd_get_south_african_states_list();
|
||
|
break;
|
||
|
case 'ES' :
|
||
|
$states = edd_get_spain_states_list();
|
||
|
break;
|
||
|
default :
|
||
|
$states = array();
|
||
|
break;
|
||
|
|
||
|
endswitch;
|
||
|
|
||
|
return apply_filters( 'edd_shop_states', $states, $country );
|
||
|
}
|
||
|
|
||
|
|
||
|
/**
|
||
|
* Get Country List
|
||
|
*
|
||
|
* @since 1.0
|
||
|
* @return array $countries A list of the available countries
|
||
|
*/
|
||
|
function edd_get_country_list() {
|
||
|
$countries = array(
|
||
|
'' => '',
|
||
|
'US' => 'United States',
|
||
|
'CA' => 'Canada',
|
||
|
'GB' => 'United Kingdom',
|
||
|
'AF' => 'Afghanistan',
|
||
|
'AX' => 'Åland Islands',
|
||
|
'AL' => 'Albania',
|
||
|
'DZ' => 'Algeria',
|
||
|
'AS' => 'American Samoa',
|
||
|
'AD' => 'Andorra',
|
||
|
'AO' => 'Angola',
|
||
|
'AI' => 'Anguilla',
|
||
|
'AQ' => 'Antarctica',
|
||
|
'AG' => 'Antigua and Barbuda',
|
||
|
'AR' => 'Argentina',
|
||
|
'AM' => 'Armenia',
|
||
|
'AW' => 'Aruba',
|
||
|
'AU' => 'Australia',
|
||
|
'AT' => 'Austria',
|
||
|
'AZ' => 'Azerbaijan',
|
||
|
'BS' => 'Bahamas',
|
||
|
'BH' => 'Bahrain',
|
||
|
'BD' => 'Bangladesh',
|
||
|
'BB' => 'Barbados',
|
||
|
'BY' => 'Belarus',
|
||
|
'BE' => 'Belgium',
|
||
|
'BZ' => 'Belize',
|
||
|
'BJ' => 'Benin',
|
||
|
'BM' => 'Bermuda',
|
||
|
'BT' => 'Bhutan',
|
||
|
'BO' => 'Bolivia',
|
||
|
'BQ' => 'Bonaire, Saint Eustatius and Saba',
|
||
|
'BA' => 'Bosnia and Herzegovina',
|
||
|
'BW' => 'Botswana',
|
||
|
'BV' => 'Bouvet Island',
|
||
|
'BR' => 'Brazil',
|
||
|
'IO' => 'British Indian Ocean Territory',
|
||
|
'BN' => 'Brunei Darrussalam',
|
||
|
'BG' => 'Bulgaria',
|
||
|
'BF' => 'Burkina Faso',
|
||
|
'BI' => 'Burundi',
|
||
|
'KH' => 'Cambodia',
|
||
|
'CM' => 'Cameroon',
|
||
|
'CV' => 'Cape Verde',
|
||
|
'KY' => 'Cayman Islands',
|
||
|
'CF' => 'Central African Republic',
|
||
|
'TD' => 'Chad',
|
||
|
'CL' => 'Chile',
|
||
|
'CN' => 'China',
|
||
|
'CX' => 'Christmas Island',
|
||
|
'CC' => 'Cocos Islands',
|
||
|
'CO' => 'Colombia',
|
||
|
'KM' => 'Comoros',
|
||
|
'CD' => 'Congo, Democratic People\'s Republic',
|
||
|
'CG' => 'Congo, Republic of',
|
||
|
'CK' => 'Cook Islands',
|
||
|
'CR' => 'Costa Rica',
|
||
|
'CI' => 'Cote d\'Ivoire',
|
||
|
'HR' => 'Croatia/Hrvatska',
|
||
|
'CU' => 'Cuba',
|
||
|
'CW' => 'CuraÇao',
|
||
|
'CY' => 'Cyprus',
|
||
|
'CZ' => 'Czechia',
|
||
|
'DK' => 'Denmark',
|
||
|
'DJ' => 'Djibouti',
|
||
|
'DM' => 'Dominica',
|
||
|
'DO' => 'Dominican Republic',
|
||
|
'TP' => 'East Timor',
|
||
|
'EC' => 'Ecuador',
|
||
|
'EG' => 'Egypt',
|
||
|
'GQ' => 'Equatorial Guinea',
|
||
|
'SV' => 'El Salvador',
|
||
|
'ER' => 'Eritrea',
|
||
|
'EE' => 'Estonia',
|
||
|
'ET' => 'Ethiopia',
|
||
|
'FK' => 'Falkland Islands',
|
||
|
'FO' => 'Faroe Islands',
|
||
|
'FJ' => 'Fiji',
|
||
|
'FI' => 'Finland',
|
||
|
'FR' => 'France',
|
||
|
'GF' => 'French Guiana',
|
||
|
'PF' => 'French Polynesia',
|
||
|
'TF' => 'French Southern Territories',
|
||
|
'GA' => 'Gabon',
|
||
|
'GM' => 'Gambia',
|
||
|
'GE' => 'Georgia',
|
||
|
'DE' => 'Germany',
|
||
|
'GR' => 'Greece',
|
||
|
'GH' => 'Ghana',
|
||
|
'GI' => 'Gibraltar',
|
||
|
'GL' => 'Greenland',
|
||
|
'GD' => 'Grenada',
|
||
|
'GP' => 'Guadeloupe',
|
||
|
'GU' => 'Guam',
|
||
|
'GT' => 'Guatemala',
|
||
|
'GG' => 'Guernsey',
|
||
|
'GN' => 'Guinea',
|
||
|
'GW' => 'Guinea-Bissau',
|
||
|
'GY' => 'Guyana',
|
||
|
'HT' => 'Haiti',
|
||
|
'HM' => 'Heard and McDonald Islands',
|
||
|
'VA' => 'Holy See (City Vatican State)',
|
||
|
'HN' => 'Honduras',
|
||
|
'HK' => 'Hong Kong',
|
||
|
'HU' => 'Hungary',
|
||
|
'IS' => 'Iceland',
|
||
|
'IN' => 'India',
|
||
|
'ID' => 'Indonesia',
|
||
|
'IR' => 'Iran',
|
||
|
'IQ' => 'Iraq',
|
||
|
'IE' => 'Ireland',
|
||
|
'IM' => 'Isle of Man',
|
||
|
'IL' => 'Israel',
|
||
|
'IT' => 'Italy',
|
||
|
'JM' => 'Jamaica',
|
||
|
'JP' => 'Japan',
|
||
|
'JE' => 'Jersey',
|
||
|
'JO' => 'Jordan',
|
||
|
'KZ' => 'Kazakhstan',
|
||
|
'KE' => 'Kenya',
|
||
|
'KI' => 'Kiribati',
|
||
|
'KW' => 'Kuwait',
|
||
|
'KG' => 'Kyrgyzstan',
|
||
|
'LA' => 'Lao People\'s Democratic Republic',
|
||
|
'LV' => 'Latvia',
|
||
|
'LB' => 'Lebanon',
|
||
|
'LS' => 'Lesotho',
|
||
|
'LR' => 'Liberia',
|
||
|
'LY' => 'Libyan Arab Jamahiriya',
|
||
|
'LI' => 'Liechtenstein',
|
||
|
'LT' => 'Lithuania',
|
||
|
'LU' => 'Luxembourg',
|
||
|
'MO' => 'Macau',
|
||
|
'MK' => 'Macedonia',
|
||
|
'MG' => 'Madagascar',
|
||
|
'MW' => 'Malawi',
|
||
|
'MY' => 'Malaysia',
|
||
|
'MV' => 'Maldives',
|
||
|
'ML' => 'Mali',
|
||
|
'MT' => 'Malta',
|
||
|
'MH' => 'Marshall Islands',
|
||
|
'MQ' => 'Martinique',
|
||
|
'MR' => 'Mauritania',
|
||
|
'MU' => 'Mauritius',
|
||
|
'YT' => 'Mayotte',
|
||
|
'MX' => 'Mexico',
|
||
|
'FM' => 'Micronesia',
|
||
|
'MD' => 'Moldova, Republic of',
|
||
|
'MC' => 'Monaco',
|
||
|
'MN' => 'Mongolia',
|
||
|
'ME' => 'Montenegro',
|
||
|
'MS' => 'Montserrat',
|
||
|
'MA' => 'Morocco',
|
||
|
'MZ' => 'Mozambique',
|
||
|
'MM' => 'Myanmar',
|
||
|
'NA' => 'Namibia',
|
||
|
'NR' => 'Nauru',
|
||
|
'NP' => 'Nepal',
|
||
|
'NL' => 'Netherlands',
|
||
|
'AN' => 'Netherlands Antilles',
|
||
|
'NC' => 'New Caledonia',
|
||
|
'NZ' => 'New Zealand',
|
||
|
'NI' => 'Nicaragua',
|
||
|
'NE' => 'Niger',
|
||
|
'NG' => 'Nigeria',
|
||
|
'NU' => 'Niue',
|
||
|
'NF' => 'Norfolk Island',
|
||
|
'KP' => 'North Korea',
|
||
|
'MP' => 'Northern Mariana Islands',
|
||
|
'NO' => 'Norway',
|
||
|
'OM' => 'Oman',
|
||
|
'PK' => 'Pakistan',
|
||
|
'PW' => 'Palau',
|
||
|
'PS' => 'Palestinian Territories',
|
||
|
'PA' => 'Panama',
|
||
|
'PG' => 'Papua New Guinea',
|
||
|
'PY' => 'Paraguay',
|
||
|
'PE' => 'Peru',
|
||
|
'PH' => 'Philippines',
|
||
|
'PN' => 'Pitcairn Island',
|
||
|
'PL' => 'Poland',
|
||
|
'PT' => 'Portugal',
|
||
|
'PR' => 'Puerto Rico',
|
||
|
'QA' => 'Qatar',
|
||
|
'XK' => 'Republic of Kosovo',
|
||
|
'RE' => 'Reunion Island',
|
||
|
'RO' => 'Romania',
|
||
|
'RU' => 'Russian Federation',
|
||
|
'RW' => 'Rwanda',
|
||
|
'BL' => 'Saint Barthélemy',
|
||
|
'SH' => 'Saint Helena',
|
||
|
'KN' => 'Saint Kitts and Nevis',
|
||
|
'LC' => 'Saint Lucia',
|
||
|
'MF' => 'Saint Martin (French)',
|
||
|
'SX' => 'Saint Martin (Dutch)',
|
||
|
'PM' => 'Saint Pierre and Miquelon',
|
||
|
'VC' => 'Saint Vincent and the Grenadines',
|
||
|
'SM' => 'San Marino',
|
||
|
'ST' => 'São Tomé and Príncipe',
|
||
|
'SA' => 'Saudi Arabia',
|
||
|
'SN' => 'Senegal',
|
||
|
'RS' => 'Serbia',
|
||
|
'SC' => 'Seychelles',
|
||
|
'SL' => 'Sierra Leone',
|
||
|
'SG' => 'Singapore',
|
||
|
'SK' => 'Slovak Republic',
|
||
|
'SI' => 'Slovenia',
|
||
|
'SB' => 'Solomon Islands',
|
||
|
'SO' => 'Somalia',
|
||
|
'ZA' => 'South Africa',
|
||
|
'GS' => 'South Georgia',
|
||
|
'KR' => 'South Korea',
|
||
|
'SS' => 'South Sudan',
|
||
|
'ES' => 'Spain',
|
||
|
'LK' => 'Sri Lanka',
|
||
|
'SD' => 'Sudan',
|
||
|
'SR' => 'Suriname',
|
||
|
'SJ' => 'Svalbard and Jan Mayen Islands',
|
||
|
'SZ' => 'Swaziland',
|
||
|
'SE' => 'Sweden',
|
||
|
'CH' => 'Switzerland',
|
||
|
'SY' => 'Syrian Arab Republic',
|
||
|
'TW' => 'Taiwan',
|
||
|
'TJ' => 'Tajikistan',
|
||
|
'TZ' => 'Tanzania',
|
||
|
'TH' => 'Thailand',
|
||
|
'TL' => 'Timor-Leste',
|
||
|
'TG' => 'Togo',
|
||
|
'TK' => 'Tokelau',
|
||
|
'TO' => 'Tonga',
|
||
|
'TT' => 'Trinidad and Tobago',
|
||
|
'TN' => 'Tunisia',
|
||
|
'TR' => 'Turkey',
|
||
|
'TM' => 'Turkmenistan',
|
||
|
'TC' => 'Turks and Caicos Islands',
|
||
|
'TV' => 'Tuvalu',
|
||
|
'UG' => 'Uganda',
|
||
|
'UA' => 'Ukraine',
|
||
|
'AE' => 'United Arab Emirates',
|
||
|
'UY' => 'Uruguay',
|
||
|
'UM' => 'US Minor Outlying Islands',
|
||
|
'UZ' => 'Uzbekistan',
|
||
|
'VU' => 'Vanuatu',
|
||
|
'VE' => 'Venezuela',
|
||
|
'VN' => 'Vietnam',
|
||
|
'VG' => 'Virgin Islands (British)',
|
||
|
'VI' => 'Virgin Islands (USA)',
|
||
|
'WF' => 'Wallis and Futuna Islands',
|
||
|
'EH' => 'Western Sahara',
|
||
|
'WS' => 'Western Samoa',
|
||
|
'YE' => 'Yemen',
|
||
|
'ZM' => 'Zambia',
|
||
|
'ZW' => 'Zimbabwe'
|
||
|
);
|
||
|
|
||
|
return apply_filters( 'edd_countries', $countries );
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Get States List
|
||
|
*
|
||
|
* @since 1.2
|
||
|
* @return array
|
||
|
*/
|
||
|
function edd_get_states_list() {
|
||
|
$states = array(
|
||
|
'' => '',
|
||
|
'AL' => 'Alabama',
|
||
|
'AK' => 'Alaska',
|
||
|
'AZ' => 'Arizona',
|
||
|
'AR' => 'Arkansas',
|
||
|
'CA' => 'California',
|
||
|
'CO' => 'Colorado',
|
||
|
'CT' => 'Connecticut',
|
||
|
'DE' => 'Delaware',
|
||
|
'DC' => 'District of Columbia',
|
||
|
'FL' => 'Florida',
|
||
|
'GA' => 'Georgia',
|
||
|
'HI' => 'Hawaii',
|
||
|
'ID' => 'Idaho',
|
||
|
'IL' => 'Illinois',
|
||
|
'IN' => 'Indiana',
|
||
|
'IA' => 'Iowa',
|
||
|
'KS' => 'Kansas',
|
||
|
'KY' => 'Kentucky',
|
||
|
'LA' => 'Louisiana',
|
||
|
'ME' => 'Maine',
|
||
|
'MD' => 'Maryland',
|
||
|
'MA' => 'Massachusetts',
|
||
|
'MI' => 'Michigan',
|
||
|
'MN' => 'Minnesota',
|
||
|
'MS' => 'Mississippi',
|
||
|
'MO' => 'Missouri',
|
||
|
'MT' => 'Montana',
|
||
|
'NE' => 'Nebraska',
|
||
|
'NV' => 'Nevada',
|
||
|
'NH' => 'New Hampshire',
|
||
|
'NJ' => 'New Jersey',
|
||
|
'NM' => 'New Mexico',
|
||
|
'NY' => 'New York',
|
||
|
'NC' => 'North Carolina',
|
||
|
'ND' => 'North Dakota',
|
||
|
'OH' => 'Ohio',
|
||
|
'OK' => 'Oklahoma',
|
||
|
'OR' => 'Oregon',
|
||
|
'PA' => 'Pennsylvania',
|
||
|
'RI' => 'Rhode Island',
|
||
|
'SC' => 'South Carolina',
|
||
|
'SD' => 'South Dakota',
|
||
|
'TN' => 'Tennessee',
|
||
|
'TX' => 'Texas',
|
||
|
'UT' => 'Utah',
|
||
|
'VT' => 'Vermont',
|
||
|
'VA' => 'Virginia',
|
||
|
'WA' => 'Washington',
|
||
|
'WV' => 'West Virginia',
|
||
|
'WI' => 'Wisconsin',
|
||
|
'WY' => 'Wyoming',
|
||
|
'AS' => 'American Samoa',
|
||
|
'CZ' => 'Canal Zone',
|
||
|
'CM' => 'Commonwealth of the Northern Mariana Islands',
|
||
|
'FM' => 'Federated States of Micronesia',
|
||
|
'GU' => 'Guam',
|
||
|
'MH' => 'Marshall Islands',
|
||
|
'MP' => 'Northern Mariana Islands',
|
||
|
'PW' => 'Palau',
|
||
|
'PI' => 'Philippine Islands',
|
||
|
'PR' => 'Puerto Rico',
|
||
|
'TT' => 'Trust Territory of the Pacific Islands',
|
||
|
'VI' => 'Virgin Islands',
|
||
|
'AA' => 'Armed Forces - Americas',
|
||
|
'AE' => 'Armed Forces - Europe, Canada, Middle East, Africa',
|
||
|
'AP' => 'Armed Forces - Pacific'
|
||
|
);
|
||
|
|
||
|
return apply_filters( 'edd_us_states', $states );
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Get Angola States
|
||
|
*
|
||
|
* @since 2.8.5
|
||
|
* @return array $states A list of states
|
||
|
*/
|
||
|
function edd_get_angola_provinces_list() {
|
||
|
$provinces = array(
|
||
|
'' => '',
|
||
|
'BGO' => 'Bengo',
|
||
|
'BGU' => 'Benguela',
|
||
|
'BIE' => 'Bié',
|
||
|
'CAB' => 'Cabinda',
|
||
|
'CNN' => 'Cunene',
|
||
|
'HUA' => 'Huambo',
|
||
|
'HUI' => 'Huíla',
|
||
|
'CCU' => 'Kuando Kubango', // Cuando Cubango
|
||
|
'CNO' => 'Kwanza-Norte', // Cuanza Norte
|
||
|
'CUS' => 'Kwanza-Sul', // Cuanza Sul
|
||
|
'LUA' => 'Luanda',
|
||
|
'LNO' => 'Lunda-Norte', // Lunda Norte
|
||
|
'LSU' => 'Lunda-Sul', // Lunda Sul
|
||
|
'MAL' => 'Malanje', // Malanje
|
||
|
'MOX' => 'Moxico',
|
||
|
'NAM' => 'Namibe',
|
||
|
'UIG' => 'Uíge',
|
||
|
'ZAI' => 'Zaire'
|
||
|
);
|
||
|
|
||
|
return apply_filters( 'edd_angola_provinces', $provinces );
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Get Provinces List
|
||
|
*
|
||
|
* @since 1.2
|
||
|
* @return array
|
||
|
*/
|
||
|
function edd_get_provinces_list() {
|
||
|
$provinces = array(
|
||
|
'' => '',
|
||
|
'AB' => 'Alberta',
|
||
|
'BC' => 'British Columbia',
|
||
|
'MB' => 'Manitoba',
|
||
|
'NB' => 'New Brunswick',
|
||
|
'NL' => 'Newfoundland and Labrador',
|
||
|
'NS' => 'Nova Scotia',
|
||
|
'NT' => 'Northwest Territories',
|
||
|
'NU' => 'Nunavut',
|
||
|
'ON' => 'Ontario',
|
||
|
'PE' => 'Prince Edward Island',
|
||
|
'QC' => 'Quebec',
|
||
|
'SK' => 'Saskatchewan',
|
||
|
'YT' => 'Yukon'
|
||
|
);
|
||
|
|
||
|
return apply_filters( 'edd_canada_provinces', $provinces );
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Get Australian States
|
||
|
*
|
||
|
* @since 1.6
|
||
|
* @return array $states A list of states
|
||
|
*/
|
||
|
function edd_get_australian_states_list() {
|
||
|
$states = array(
|
||
|
'' => '',
|
||
|
'ACT' => 'Australian Capital Territory',
|
||
|
'NSW' => 'New South Wales',
|
||
|
'NT' => 'Northern Territory',
|
||
|
'QLD' => 'Queensland',
|
||
|
'SA' => 'South Australia',
|
||
|
'TAS' => 'Tasmania',
|
||
|
'VIC' => 'Victoria',
|
||
|
'WA' => 'Western Australia'
|
||
|
);
|
||
|
|
||
|
return apply_filters( 'edd_australian_states', $states );
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Get Bangladeshi States (districts)
|
||
|
*
|
||
|
* @since 2.2.3
|
||
|
* @return array $states A list of states
|
||
|
*/
|
||
|
function edd_get_bangladeshi_states_list() {
|
||
|
$states = array(
|
||
|
'' => '',
|
||
|
'BAG' => 'Bagerhat',
|
||
|
'BAN' => 'Bandarban',
|
||
|
'BAR' => 'Barguna',
|
||
|
'BARI'=> 'Barisal',
|
||
|
'BHO' => 'Bhola',
|
||
|
'BOG' => 'Bogra',
|
||
|
'BRA' => 'Brahmanbaria',
|
||
|
'CHA' => 'Chandpur',
|
||
|
'CHI' => 'Chittagong',
|
||
|
'CHU' => 'Chuadanga',
|
||
|
'COM' => 'Comilla',
|
||
|
'COX' => 'Cox\'s Bazar',
|
||
|
'DHA' => 'Dhaka',
|
||
|
'DIN' => 'Dinajpur',
|
||
|
'FAR' => 'Faridpur',
|
||
|
'FEN' => 'Feni',
|
||
|
'GAI' => 'Gaibandha',
|
||
|
'GAZI'=> 'Gazipur',
|
||
|
'GOP' => 'Gopalganj',
|
||
|
'HAB' => 'Habiganj',
|
||
|
'JAM' => 'Jamalpur',
|
||
|
'JES' => 'Jessore',
|
||
|
'JHA' => 'Jhalokati',
|
||
|
'JHE' => 'Jhenaidah',
|
||
|
'JOY' => 'Joypurhat',
|
||
|
'KHA' => 'Khagrachhari',
|
||
|
'KHU' => 'Khulna',
|
||
|
'KIS' => 'Kishoreganj',
|
||
|
'KUR' => 'Kurigram',
|
||
|
'KUS' => 'Kushtia',
|
||
|
'LAK' => 'Lakshmipur',
|
||
|
'LAL' => 'Lalmonirhat',
|
||
|
'MAD' => 'Madaripur',
|
||
|
'MAG' => 'Magura',
|
||
|
'MAN' => 'Manikganj',
|
||
|
'MEH' => 'Meherpur',
|
||
|
'MOU' => 'Moulvibazar',
|
||
|
'MUN' => 'Munshiganj',
|
||
|
'MYM' => 'Mymensingh',
|
||
|
'NAO' => 'Naogaon',
|
||
|
'NAR' => 'Narail',
|
||
|
'NARG'=> 'Narayanganj',
|
||
|
'NARD'=> 'Narsingdi',
|
||
|
'NAT' => 'Natore',
|
||
|
'NAW' => 'Nawabganj',
|
||
|
'NET' => 'Netrakona',
|
||
|
'NIL' => 'Nilphamari',
|
||
|
'NOA' => 'Noakhali',
|
||
|
'PAB' => 'Pabna',
|
||
|
'PAN' => 'Panchagarh',
|
||
|
'PAT' => 'Patuakhali',
|
||
|
'PIR' => 'Pirojpur',
|
||
|
'RAJB'=> 'Rajbari',
|
||
|
'RAJ' => 'Rajshahi',
|
||
|
'RAN' => 'Rangamati',
|
||
|
'RANP'=> 'Rangpur',
|
||
|
'SAT' => 'Satkhira',
|
||
|
'SHA' => 'Shariatpur',
|
||
|
'SHE' => 'Sherpur',
|
||
|
'SIR' => 'Sirajganj',
|
||
|
'SUN' => 'Sunamganj',
|
||
|
'SYL' => 'Sylhet',
|
||
|
'TAN' => 'Tangail',
|
||
|
'THA' => 'Thakurgaon'
|
||
|
);
|
||
|
|
||
|
return apply_filters( 'edd_bangladeshi_states', $states );
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Get Brazil States
|
||
|
*
|
||
|
* @since 1.6
|
||
|
* @return array $states A list of states
|
||
|
*/
|
||
|
function edd_get_brazil_states_list() {
|
||
|
$states = array(
|
||
|
'' => '',
|
||
|
'AC' => 'Acre',
|
||
|
'AL' => 'Alagoas',
|
||
|
'AP' => 'Amapá',
|
||
|
'AM' => 'Amazonas',
|
||
|
'BA' => 'Bahia',
|
||
|
'CE' => 'Ceará',
|
||
|
'DF' => 'Distrito Federal',
|
||
|
'ES' => 'Espírito Santo',
|
||
|
'GO' => 'Goiás',
|
||
|
'MA' => 'Maranhão',
|
||
|
'MT' => 'Mato Grosso',
|
||
|
'MS' => 'Mato Grosso do Sul',
|
||
|
'MG' => 'Minas Gerais',
|
||
|
'PA' => 'Pará',
|
||
|
'PB' => 'Paraíba',
|
||
|
'PR' => 'Paraná',
|
||
|
'PE' => 'Pernambuco',
|
||
|
'PI' => 'Piauí',
|
||
|
'RJ' => 'Rio de Janeiro',
|
||
|
'RN' => 'Rio Grande do Norte',
|
||
|
'RS' => 'Rio Grande do Sul',
|
||
|
'RO' => 'Rondônia',
|
||
|
'RR' => 'Roraima',
|
||
|
'SC' => 'Santa Catarina',
|
||
|
'SP' => 'São Paulo',
|
||
|
'SE' => 'Sergipe',
|
||
|
'TO' => 'Tocantins'
|
||
|
);
|
||
|
|
||
|
return apply_filters( 'edd_brazil_states', $states );
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Get Bulgarian States
|
||
|
*
|
||
|
* @since 2.2.3
|
||
|
* @return array $states A list of states
|
||
|
*/
|
||
|
function edd_get_bulgarian_states_list() {
|
||
|
$states = array(
|
||
|
'' => '',
|
||
|
'BG-01' => 'Blagoevgrad',
|
||
|
'BG-02' => 'Burgas',
|
||
|
'BG-08' => 'Dobrich',
|
||
|
'BG-07' => 'Gabrovo',
|
||
|
'BG-26' => 'Haskovo',
|
||
|
'BG-09' => 'Kardzhali',
|
||
|
'BG-10' => 'Kyustendil',
|
||
|
'BG-11' => 'Lovech',
|
||
|
'BG-12' => 'Montana',
|
||
|
'BG-13' => 'Pazardzhik',
|
||
|
'BG-14' => 'Pernik',
|
||
|
'BG-15' => 'Pleven',
|
||
|
'BG-16' => 'Plovdiv',
|
||
|
'BG-17' => 'Razgrad',
|
||
|
'BG-18' => 'Ruse',
|
||
|
'BG-27' => 'Shumen',
|
||
|
'BG-19' => 'Silistra',
|
||
|
'BG-20' => 'Sliven',
|
||
|
'BG-21' => 'Smolyan',
|
||
|
'BG-23' => 'Sofia',
|
||
|
'BG-22' => 'Sofia-Grad',
|
||
|
'BG-24' => 'Stara Zagora',
|
||
|
'BG-25' => 'Targovishte',
|
||
|
'BG-03' => 'Varna',
|
||
|
'BG-04' => 'Veliko Tarnovo',
|
||
|
'BG-05' => 'Vidin',
|
||
|
'BG-06' => 'Vratsa',
|
||
|
'BG-28' => 'Yambol'
|
||
|
);
|
||
|
|
||
|
return apply_filters( 'edd_bulgarian_states', $states );
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Get Hong Kong States
|
||
|
*
|
||
|
* @since 1.6
|
||
|
* @return array $states A list of states
|
||
|
*/
|
||
|
function edd_get_hong_kong_states_list() {
|
||
|
$states = array(
|
||
|
'' => '',
|
||
|
'HONG KONG' => 'Hong Kong Island',
|
||
|
'KOWLOON' => 'Kowloon',
|
||
|
'NEW TERRITORIES' => 'New Territories'
|
||
|
);
|
||
|
|
||
|
return apply_filters( 'edd_hong_kong_states', $states );
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Get Hungary States
|
||
|
*
|
||
|
* @since 1.6
|
||
|
* @return array $states A list of states
|
||
|
*/
|
||
|
function edd_get_hungary_states_list() {
|
||
|
$states = array(
|
||
|
'' => '',
|
||
|
'BK' => 'Bács-Kiskun',
|
||
|
'BE' => 'Békés',
|
||
|
'BA' => 'Baranya',
|
||
|
'BZ' => 'Borsod-Abaúj-Zemplén',
|
||
|
'BU' => 'Budapest',
|
||
|
'CS' => 'Csongrád',
|
||
|
'FE' => 'Fejér',
|
||
|
'GS' => 'Győr-Moson-Sopron',
|
||
|
'HB' => 'Hajdú-Bihar',
|
||
|
'HE' => 'Heves',
|
||
|
'JN' => 'Jász-Nagykun-Szolnok',
|
||
|
'KE' => 'Komárom-Esztergom',
|
||
|
'NO' => 'Nógrád',
|
||
|
'PE' => 'Pest',
|
||
|
'SO' => 'Somogy',
|
||
|
'SZ' => 'Szabolcs-Szatmár-Bereg',
|
||
|
'TO' => 'Tolna',
|
||
|
'VA' => 'Vas',
|
||
|
'VE' => 'Veszprém',
|
||
|
'ZA' => 'Zala'
|
||
|
);
|
||
|
|
||
|
return apply_filters( 'edd_hungary_states', $states );
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Get Japanese States
|
||
|
*
|
||
|
* @since 2.2.3
|
||
|
* @return array $states A list of states
|
||
|
*/
|
||
|
function edd_get_japanese_states_list() {
|
||
|
$states = array(
|
||
|
'' => '',
|
||
|
'JP01' => 'Hokkaido',
|
||
|
'JP02' => 'Aomori',
|
||
|
'JP03' => 'Iwate',
|
||
|
'JP04' => 'Miyagi',
|
||
|
'JP05' => 'Akita',
|
||
|
'JP06' => 'Yamagata',
|
||
|
'JP07' => 'Fukushima',
|
||
|
'JP08' => 'Ibaraki',
|
||
|
'JP09' => 'Tochigi',
|
||
|
'JP10' => 'Gunma',
|
||
|
'JP11' => 'Saitama',
|
||
|
'JP12' => 'Chiba',
|
||
|
'JP13' => 'Tokyo',
|
||
|
'JP14' => 'Kanagawa',
|
||
|
'JP15' => 'Niigata',
|
||
|
'JP16' => 'Toyama',
|
||
|
'JP17' => 'Ishikawa',
|
||
|
'JP18' => 'Fukui',
|
||
|
'JP19' => 'Yamanashi',
|
||
|
'JP20' => 'Nagano',
|
||
|
'JP21' => 'Gifu',
|
||
|
'JP22' => 'Shizuoka',
|
||
|
'JP23' => 'Aichi',
|
||
|
'JP24' => 'Mie',
|
||
|
'JP25' => 'Shiga',
|
||
|
'JP26' => 'Kyouto',
|
||
|
'JP27' => 'Osaka',
|
||
|
'JP28' => 'Hyougo',
|
||
|
'JP29' => 'Nara',
|
||
|
'JP30' => 'Wakayama',
|
||
|
'JP31' => 'Tottori',
|
||
|
'JP32' => 'Shimane',
|
||
|
'JP33' => 'Okayama',
|
||
|
'JP34' => 'Hiroshima',
|
||
|
'JP35' => 'Yamaguchi',
|
||
|
'JP36' => 'Tokushima',
|
||
|
'JP37' => 'Kagawa',
|
||
|
'JP38' => 'Ehime',
|
||
|
'JP39' => 'Kochi',
|
||
|
'JP40' => 'Fukuoka',
|
||
|
'JP41' => 'Saga',
|
||
|
'JP42' => 'Nagasaki',
|
||
|
'JP43' => 'Kumamoto',
|
||
|
'JP44' => 'Oita',
|
||
|
'JP45' => 'Miyazaki',
|
||
|
'JP46' => 'Kagoshima',
|
||
|
'JP47' => 'Okinawa'
|
||
|
);
|
||
|
|
||
|
return apply_filters( 'edd_japanese_states', $states );
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Get Chinese States
|
||
|
*
|
||
|
* @since 1.6
|
||
|
* @return array $states A list of states
|
||
|
*/
|
||
|
function edd_get_chinese_states_list() {
|
||
|
$states = array(
|
||
|
'' => '',
|
||
|
'CN1' => 'Yunnan / 云南',
|
||
|
'CN2' => 'Beijing / 北京',
|
||
|
'CN3' => 'Tianjin / 天津',
|
||
|
'CN4' => 'Hebei / 河北',
|
||
|
'CN5' => 'Shanxi / 山西',
|
||
|
'CN6' => 'Inner Mongolia / 內蒙古',
|
||
|
'CN7' => 'Liaoning / 辽宁',
|
||
|
'CN8' => 'Jilin / 吉林',
|
||
|
'CN9' => 'Heilongjiang / 黑龙江',
|
||
|
'CN10' => 'Shanghai / 上海',
|
||
|
'CN11' => 'Jiangsu / 江苏',
|
||
|
'CN12' => 'Zhejiang / 浙江',
|
||
|
'CN13' => 'Anhui / 安徽',
|
||
|
'CN14' => 'Fujian / 福建',
|
||
|
'CN15' => 'Jiangxi / 江西',
|
||
|
'CN16' => 'Shandong / 山东',
|
||
|
'CN17' => 'Henan / 河南',
|
||
|
'CN18' => 'Hubei / 湖北',
|
||
|
'CN19' => 'Hunan / 湖南',
|
||
|
'CN20' => 'Guangdong / 广东',
|
||
|
'CN21' => 'Guangxi Zhuang / 广西壮族',
|
||
|
'CN22' => 'Hainan / 海南',
|
||
|
'CN23' => 'Chongqing / 重庆',
|
||
|
'CN24' => 'Sichuan / 四川',
|
||
|
'CN25' => 'Guizhou / 贵州',
|
||
|
'CN26' => 'Shaanxi / 陕西',
|
||
|
'CN27' => 'Gansu / 甘肃',
|
||
|
'CN28' => 'Qinghai / 青海',
|
||
|
'CN29' => 'Ningxia Hui / 宁夏',
|
||
|
'CN30' => 'Macau / 澳门',
|
||
|
'CN31' => 'Tibet / 西藏',
|
||
|
'CN32' => 'Xinjiang / 新疆'
|
||
|
);
|
||
|
|
||
|
return apply_filters( 'edd_chinese_states', $states );
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Get United Kingdom States
|
||
|
*
|
||
|
* @since 2.9
|
||
|
* @return array $states A list of states
|
||
|
*/
|
||
|
function edd_get_united_kingdom_states_list() {
|
||
|
$states = array(
|
||
|
'' => '',
|
||
|
'GB-ABE' => 'Aberdeen City',
|
||
|
'GB-ABD' => 'Aberdeenshire',
|
||
|
'GB-ANS' => 'Angus',
|
||
|
'GB-ANN' => 'Antrim and Newtownabbey',
|
||
|
'GB-AND' => 'Ards and North Down',
|
||
|
'GB-AGB' => 'Argyll and Bute',
|
||
|
'GB-ABC' => 'Armagh, Banbridge and Craigavon',
|
||
|
'GB-BDG' => 'Barking and Dagenham',
|
||
|
'GB-BNE' => 'Barnet',
|
||
|
'GB-BNS' => 'Barnsley',
|
||
|
'GB-BAS' => 'Bath and North East Somerset',
|
||
|
'GB-BDF' => 'Bedford',
|
||
|
'GB-BFS' => 'Belfast',
|
||
|
'GB-BEX' => 'Bexley',
|
||
|
'GB-BIR' => 'Birmingham',
|
||
|
'GB-BBD' => 'Blackburn with Darwen',
|
||
|
'GB-BPL' => 'Blackpool',
|
||
|
'GB-BGW' => 'Blaenau Gwent',
|
||
|
'GB-BOL' => 'Bolton',
|
||
|
'GB-BMH' => 'Bournemouth',
|
||
|
'GB-BRC' => 'Bracknell Forest',
|
||
|
'GB-BRD' => 'Bradford',
|
||
|
'GB-BEN' => 'Brent',
|
||
|
'GB-BGE' => 'Bridgend',
|
||
|
'GB-BNH' => 'Brighton and Hove',
|
||
|
'GB-BST' => 'Bristol, City of',
|
||
|
'GB-BRY' => 'Bromley',
|
||
|
'GB-BKM' => 'Buckinghamshire',
|
||
|
'GB-BUR' => 'Bury',
|
||
|
'GB-CAY' => 'Caerphilly',
|
||
|
'GB-CLD' => 'Calderdale',
|
||
|
'GB-CAM' => 'Cambridgeshire',
|
||
|
'GB-CMD' => 'Camden',
|
||
|
'GB-CRF' => 'Cardiff',
|
||
|
'GB-CMN' => 'Carmarthenshire',
|
||
|
'GB-CCG' => 'Causeway Coast and Glens',
|
||
|
'GB-CBF' => 'Central Bedfordshire',
|
||
|
'GB-CGN' => 'Ceredigion',
|
||
|
'GB-CHE' => 'Cheshire East',
|
||
|
'GB-CHW' => 'Cheshire West and Chester',
|
||
|
'GB-CLK' => 'Clackmannanshire',
|
||
|
'GB-CWY' => 'Conwy',
|
||
|
'GB-CON' => 'Cornwall',
|
||
|
'GB-COV' => 'Coventry',
|
||
|
'GB-CRY' => 'Croydon',
|
||
|
'GB-CMA' => 'Cumbria',
|
||
|
'GB-DAL' => 'Darlington',
|
||
|
'GB-DEN' => 'Denbighshire',
|
||
|
'GB-DER' => 'Derby',
|
||
|
'GB-DBY' => 'Derbyshire',
|
||
|
'GB-DRS' => 'Derry and Strabane',
|
||
|
'GB-DEV' => 'Devon',
|
||
|
'GB-DNC' => 'Doncaster',
|
||
|
'GB-DOR' => 'Dorset',
|
||
|
'GB-DUD' => 'Dudley',
|
||
|
'GB-DGY' => 'Dumfries and Galloway',
|
||
|
'GB-DND' => 'Dundee City',
|
||
|
'GB-DUR' => 'Durham, County',
|
||
|
'GB-EAL' => 'Ealing',
|
||
|
'GB-EAY' => 'East Ayrshire',
|
||
|
'GB-EDU' => 'East Dunbartonshire',
|
||
|
'GB-ELN' => 'East Lothian',
|
||
|
'GB-ERW' => 'East Renfrewshire',
|
||
|
'GB-ERY' => 'East Riding of Yorkshire',
|
||
|
'GB-ESX' => 'East Sussex',
|
||
|
'GB-EDH' => 'Edinburgh, City of',
|
||
|
'GB-ELS' => 'Eilean Siar',
|
||
|
'GB-ENF' => 'Enfield',
|
||
|
'GB-ESS' => 'Essex',
|
||
|
'GB-FAL' => 'Falkirk',
|
||
|
'GB-FMO' => 'Fermanagh and Omagh',
|
||
|
'GB-FIF' => 'Fife',
|
||
|
'GB-FLN' => 'Flintshire',
|
||
|
'GB-GAT' => 'Gateshead',
|
||
|
'GB-GLG' => 'Glasgow City',
|
||
|
'GB-GLS' => 'Gloucestershire',
|
||
|
'GB-GRE' => 'Greenwich',
|
||
|
'GB-GWN' => 'Gwynedd',
|
||
|
'GB-HCK' => 'Hackney',
|
||
|
'GB-HAL' => 'Halton',
|
||
|
'GB-HMF' => 'Hammersmith and Fulham',
|
||
|
'GB-HAM' => 'Hampshire',
|
||
|
'GB-HRY' => 'Haringey',
|
||
|
'GB-HRW' => 'Harrow',
|
||
|
'GB-HPL' => 'Hartlepool',
|
||
|
'GB-HAV' => 'Havering',
|
||
|
'GB-HEF' => 'Herefordshire',
|
||
|
'GB-HRT' => 'Hertfordshire',
|
||
|
'GB-HLD' => 'Highland',
|
||
|
'GB-HIL' => 'Hillingdon',
|
||
|
'GB-HNS' => 'Hounslow',
|
||
|
'GB-IVC' => 'Inverclyde',
|
||
|
'GB-AGY' => 'Isle of Anglesey',
|
||
|
'GB-IOW' => 'Isle of Wight',
|
||
|
'GB-IOS' => 'Isles of Scilly',
|
||
|
'GB-ISL' => 'Islington',
|
||
|
'GB-KEC' => 'Kensington and Chelsea',
|
||
|
'GB-KEN' => 'Kent',
|
||
|
'GB-KHL' => 'Kingston upon Hull',
|
||
|
'GB-KTT' => 'Kingston upon Thames',
|
||
|
'GB-KIR' => 'Kirklees',
|
||
|
'GB-KWL' => 'Knowsley',
|
||
|
'GB-LBH' => 'Lambeth',
|
||
|
'GB-LAN' => 'Lancashire',
|
||
|
'GB-LDS' => 'Leeds',
|
||
|
'GB-LCE' => 'Leicester',
|
||
|
'GB-LEC' => 'Leicestershire',
|
||
|
'GB-LEW' => 'Lewisham',
|
||
|
'GB-LIN' => 'Lincolnshire',
|
||
|
'GB-LBC' => 'Lisburn and Castlereagh',
|
||
|
'GB-LIV' => 'Liverpool',
|
||
|
'GB-LND' => 'London, City of',
|
||
|
'GB-LUT' => 'Luton',
|
||
|
'GB-MAN' => 'Manchester',
|
||
|
'GB-MDW' => 'Medway',
|
||
|
'GB-MTY' => 'Merthyr Tydfil',
|
||
|
'GB-MRT' => 'Merton',
|
||
|
'GB-MEA' => 'Mid and East Antrim',
|
||
|
'GB-MUL' => 'Mid Ulster',
|
||
|
'GB-MDB' => 'Middlesbrough',
|
||
|
'GB-MLN' => 'Midlothian',
|
||
|
'GB-MIK' => 'Milton Keynes',
|
||
|
'GB-MON' => 'Monmouthshire',
|
||
|
'GB-MRY' => 'Moray',
|
||
|
'GB-NTL' => 'Neath Port Talbot',
|
||
|
'GB-NET' => 'Newcastle upon Tyne',
|
||
|
'GB-NWM' => 'Newham',
|
||
|
'GB-NWP' => 'Newport',
|
||
|
'GB-NMD' => 'Newry, Mourne and Down',
|
||
|
'GB-NFK' => 'Norfolk',
|
||
|
'GB-NAY' => 'North Ayrshire',
|
||
|
'GB-NEL' => 'North East Lincolnshire',
|
||
|
'GB-NLK' => 'North Lanarkshire',
|
||
|
'GB-NLN' => 'North Lincolnshire',
|
||
|
'GB-NSM' => 'North Somerset',
|
||
|
'GB-NTY' => 'North Tyneside',
|
||
|
'GB-NYK' => 'North Yorkshire',
|
||
|
'GB-NTH' => 'Northamptonshire',
|
||
|
'GB-NBL' => 'Northumberland',
|
||
|
'GB-NGM' => 'Nottingham',
|
||
|
'GB-NTT' => 'Nottinghamshire',
|
||
|
'GB-OLD' => 'Oldham',
|
||
|
'GB-ORK' => 'Orkney Islands',
|
||
|
'GB-OXF' => 'Oxfordshire',
|
||
|
'GB-PEM' => 'Pembrokeshire',
|
||
|
'GB-PKN' => 'Perth and Kinross',
|
||
|
'GB-PTE' => 'Peterborough',
|
||
|
'GB-PLY' => 'Plymouth',
|
||
|
'GB-POL' => 'Poole',
|
||
|
'GB-POR' => 'Portsmouth',
|
||
|
'GB-POW' => 'Powys',
|
||
|
'GB-RDG' => 'Reading',
|
||
|
'GB-RDB' => 'Redbridge',
|
||
|
'GB-RCC' => 'Redcar and Cleveland',
|
||
|
'GB-RFW' => 'Renfrewshire',
|
||
|
'GB-RCT' => 'Rhondda, Cynon, Taff',
|
||
|
'GB-RIC' => 'Richmond upon Thames',
|
||
|
'GB-RCH' => 'Rochdale',
|
||
|
'GB-ROT' => 'Rotherham',
|
||
|
'GB-RUT' => 'Rutland',
|
||
|
'GB-SLF' => 'Salford',
|
||
|
'GB-SAW' => 'Sandwell',
|
||
|
'GB-SCB' => 'Scottish Borders, The',
|
||
|
'GB-SFT' => 'Sefton',
|
||
|
'GB-SHF' => 'Sheffield',
|
||
|
'GB-ZET' => 'Shetland Islands',
|
||
|
'GB-SHR' => 'Shropshire',
|
||
|
'GB-SLG' => 'Slough',
|
||
|
'GB-SOL' => 'Solihull',
|
||
|
'GB-SOM' => 'Somerset',
|
||
|
'GB-SAY' => 'South Ayrshire',
|
||
|
'GB-SGC' => 'South Gloucestershire',
|
||
|
'GB-SLK' => 'South Lanarkshire',
|
||
|
'GB-STY' => 'South Tyneside',
|
||
|
'GB-STH' => 'Southampton',
|
||
|
'GB-SOS' => 'Southend-on-Sea',
|
||
|
'GB-SWK' => 'Southwark',
|
||
|
'GB-SHN' => 'St. Helens',
|
||
|
'GB-STS' => 'Staffordshire',
|
||
|
'GB-STG' => 'Stirling',
|
||
|
'GB-SKP' => 'Stockport',
|
||
|
'GB-STT' => 'Stockton-on-Tees',
|
||
|
'GB-STE' => 'Stoke-on-Trent',
|
||
|
'GB-SFK' => 'Suffolk',
|
||
|
'GB-SND' => 'Sunderland',
|
||
|
'GB-SRY' => 'Surrey',
|
||
|
'GB-STN' => 'Sutton',
|
||
|
'GB-SWA' => 'Swansea',
|
||
|
'GB-SWD' => 'Swindon',
|
||
|
'GB-TAM' => 'Tameside',
|
||
|
'GB-TFW' => 'Telford and Wrekin',
|
||
|
'GB-THR' => 'Thurrock',
|
||
|
'GB-TOB' => 'Torbay',
|
||
|
'GB-TOF' => 'Torfaen',
|
||
|
'GB-TWH' => 'Tower Hamlets',
|
||
|
'GB-TRF' => 'Trafford',
|
||
|
'GB-VGL' => 'Vale of Glamorgan, The',
|
||
|
'GB-WKF' => 'Wakefield',
|
||
|
'GB-WLL' => 'Walsall',
|
||
|
'GB-WFT' => 'Waltham Forest',
|
||
|
'GB-WND' => 'Wandsworth',
|
||
|
'GB-WRT' => 'Warrington',
|
||
|
'GB-WAR' => 'Warwickshire',
|
||
|
'GB-WBK' => 'West Berkshire',
|
||
|
'GB-WDU' => 'West Dunbartonshire',
|
||
|
'GB-WLN' => 'West Lothian',
|
||
|
'GB-WSX' => 'West Sussex',
|
||
|
'GB-WSM' => 'Westminster',
|
||
|
'GB-WGN' => 'Wigan',
|
||
|
'GB-WIL' => 'Wiltshire',
|
||
|
'GB-WNM' => 'Windsor and Maidenhead',
|
||
|
'GB-WRL' => 'Wirral',
|
||
|
'GB-WOK' => 'Wokingham',
|
||
|
'GB-WLV' => 'Wolverhampton',
|
||
|
'GB-WOR' => 'Worcestershire',
|
||
|
'GB-WRX' => 'Wrexham',
|
||
|
'GB-YOR' => 'York',
|
||
|
);
|
||
|
|
||
|
return apply_filters( 'edd_united_kingdom_states', $states );
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Get New Zealand States
|
||
|
*
|
||
|
* @since 1.6
|
||
|
* @return array $states A list of states
|
||
|
*/
|
||
|
function edd_get_new_zealand_states_list() {
|
||
|
$states = array(
|
||
|
'' => '',
|
||
|
'AK' => 'Auckland',
|
||
|
'BP' => 'Bay of Plenty',
|
||
|
'CT' => 'Canterbury',
|
||
|
'HB' => 'Hawke’s Bay',
|
||
|
'MW' => 'Manawatu-Wanganui',
|
||
|
'MB' => 'Marlborough',
|
||
|
'NS' => 'Nelson',
|
||
|
'NL' => 'Northland',
|
||
|
'OT' => 'Otago',
|
||
|
'SL' => 'Southland',
|
||
|
'TK' => 'Taranaki',
|
||
|
'TM' => 'Tasman',
|
||
|
'WA' => 'Waikato',
|
||
|
'WR' => 'Wairarapa',
|
||
|
'WE' => 'Wellington',
|
||
|
'WC' => 'West Coast'
|
||
|
);
|
||
|
|
||
|
return apply_filters( 'edd_new_zealand_states', $states );
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Get Peruvian States
|
||
|
*
|
||
|
* @since 2.2.3
|
||
|
* @return array $states A list of states
|
||
|
*/
|
||
|
function edd_get_peruvian_states_list() {
|
||
|
$states = array(
|
||
|
'' => '',
|
||
|
'CAL' => 'El Callao',
|
||
|
'LMA' => 'Municipalidad Metropolitana de Lima',
|
||
|
'AMA' => 'Amazonas',
|
||
|
'ANC' => 'Ancash',
|
||
|
'APU' => 'Apurímac',
|
||
|
'ARE' => 'Arequipa',
|
||
|
'AYA' => 'Ayacucho',
|
||
|
'CAJ' => 'Cajamarca',
|
||
|
'CUS' => 'Cusco',
|
||
|
'HUV' => 'Huancavelica',
|
||
|
'HUC' => 'Huánuco',
|
||
|
'ICA' => 'Ica',
|
||
|
'JUN' => 'Junín',
|
||
|
'LAL' => 'La Libertad',
|
||
|
'LAM' => 'Lambayeque',
|
||
|
'LIM' => 'Lima',
|
||
|
'LOR' => 'Loreto',
|
||
|
'MDD' => 'Madre de Dios',
|
||
|
'MOQ' => 'Moquegua',
|
||
|
'PAS' => 'Pasco',
|
||
|
'PIU' => 'Piura',
|
||
|
'PUN' => 'Puno',
|
||
|
'SAM' => 'San Martín',
|
||
|
'TAC' => 'Tacna',
|
||
|
'TUM' => 'Tumbes',
|
||
|
'UCA' => 'Ucayali'
|
||
|
);
|
||
|
|
||
|
return apply_filters( 'edd_peruvian_states', $states );
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Get Indonesian States
|
||
|
*
|
||
|
* @since 1.6
|
||
|
* @return array $states A list of states
|
||
|
*/
|
||
|
function edd_get_indonesian_states_list() {
|
||
|
$states = array(
|
||
|
'' => '',
|
||
|
'AC' => 'Daerah Istimewa Aceh',
|
||
|
'SU' => 'Sumatera Utara',
|
||
|
'SB' => 'Sumatera Barat',
|
||
|
'RI' => 'Riau',
|
||
|
'KR' => 'Kepulauan Riau',
|
||
|
'JA' => 'Jambi',
|
||
|
'SS' => 'Sumatera Selatan',
|
||
|
'BB' => 'Bangka Belitung',
|
||
|
'BE' => 'Bengkulu',
|
||
|
'LA' => 'Lampung',
|
||
|
'JK' => 'DKI Jakarta',
|
||
|
'JB' => 'Jawa Barat',
|
||
|
'BT' => 'Banten',
|
||
|
'JT' => 'Jawa Tengah',
|
||
|
'JI' => 'Jawa Timur',
|
||
|
'YO' => 'Daerah Istimewa Yogyakarta',
|
||
|
'BA' => 'Bali',
|
||
|
'NB' => 'Nusa Tenggara Barat',
|
||
|
'NT' => 'Nusa Tenggara Timur',
|
||
|
'KB' => 'Kalimantan Barat',
|
||
|
'KT' => 'Kalimantan Tengah',
|
||
|
'KI' => 'Kalimantan Timur',
|
||
|
'KS' => 'Kalimantan Selatan',
|
||
|
'KU' => 'Kalimantan Utara',
|
||
|
'SA' => 'Sulawesi Utara',
|
||
|
'ST' => 'Sulawesi Tengah',
|
||
|
'SG' => 'Sulawesi Tenggara',
|
||
|
'SR' => 'Sulawesi Barat',
|
||
|
'SN' => 'Sulawesi Selatan',
|
||
|
'GO' => 'Gorontalo',
|
||
|
'MA' => 'Maluku',
|
||
|
'MU' => 'Maluku Utara',
|
||
|
'PA' => 'Papua',
|
||
|
'PB' => 'Papua Barat'
|
||
|
);
|
||
|
|
||
|
return apply_filters( 'edd_indonesia_states', $states );
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Get Indian States
|
||
|
*
|
||
|
* @since 1.6
|
||
|
* @return array $states A list of states
|
||
|
*/
|
||
|
function edd_get_indian_states_list() {
|
||
|
$states = array(
|
||
|
'' => '',
|
||
|
'AP' => 'Andhra Pradesh',
|
||
|
'AR' => 'Arunachal Pradesh',
|
||
|
'AS' => 'Assam',
|
||
|
'BR' => 'Bihar',
|
||
|
'CT' => 'Chhattisgarh',
|
||
|
'GA' => 'Goa',
|
||
|
'GJ' => 'Gujarat',
|
||
|
'HR' => 'Haryana',
|
||
|
'HP' => 'Himachal Pradesh',
|
||
|
'JK' => 'Jammu and Kashmir',
|
||
|
'JH' => 'Jharkhand',
|
||
|
'KA' => 'Karnataka',
|
||
|
'KL' => 'Kerala',
|
||
|
'MP' => 'Madhya Pradesh',
|
||
|
'MH' => 'Maharashtra',
|
||
|
'MN' => 'Manipur',
|
||
|
'ML' => 'Meghalaya',
|
||
|
'MZ' => 'Mizoram',
|
||
|
'NL' => 'Nagaland',
|
||
|
'OR' => 'Orissa',
|
||
|
'PB' => 'Punjab',
|
||
|
'RJ' => 'Rajasthan',
|
||
|
'SK' => 'Sikkim',
|
||
|
'TN' => 'Tamil Nadu',
|
||
|
'TG' => 'Telangana',
|
||
|
'TR' => 'Tripura',
|
||
|
'UT' => 'Uttarakhand',
|
||
|
'UP' => 'Uttar Pradesh',
|
||
|
'WB' => 'West Bengal',
|
||
|
'AN' => 'Andaman and Nicobar Islands',
|
||
|
'CH' => 'Chandigarh',
|
||
|
'DN' => 'Dadar and Nagar Haveli',
|
||
|
'DD' => 'Daman and Diu',
|
||
|
'DL' => 'Delhi',
|
||
|
'LD' => 'Lakshadweep',
|
||
|
'PY' => 'Pondicherry (Puducherry)'
|
||
|
);
|
||
|
|
||
|
return apply_filters( 'edd_indian_states', $states );
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Get Iranian States
|
||
|
*
|
||
|
* @since 2.2.3
|
||
|
* @return array $states A list of states
|
||
|
*/
|
||
|
function edd_get_iranian_states_list() {
|
||
|
$states = array(
|
||
|
'' => '',
|
||
|
'KHZ' => 'Khuzestan',
|
||
|
'THR' => 'Tehran',
|
||
|
'ILM' => 'Ilaam',
|
||
|
'BHR' => 'Bushehr',
|
||
|
'ADL' => 'Ardabil',
|
||
|
'ESF' => 'Isfahan',
|
||
|
'YZD' => 'Yazd',
|
||
|
'KRH' => 'Kermanshah',
|
||
|
'KRN' => 'Kerman',
|
||
|
'HDN' => 'Hamadan',
|
||
|
'GZN' => 'Ghazvin',
|
||
|
'ZJN' => 'Zanjan',
|
||
|
'LRS' => 'Luristan',
|
||
|
'ABZ' => 'Alborz',
|
||
|
'EAZ' => 'East Azerbaijan',
|
||
|
'WAZ' => 'West Azerbaijan',
|
||
|
'CHB' => 'Chaharmahal and Bakhtiari',
|
||
|
'SKH' => 'South Khorasan',
|
||
|
'RKH' => 'Razavi Khorasan',
|
||
|
'NKH' => 'North Khorasan',
|
||
|
'SMN' => 'Semnan',
|
||
|
'FRS' => 'Fars',
|
||
|
'QHM' => 'Qom',
|
||
|
'KRD' => 'Kurdistan',
|
||
|
'KBD' => 'Kohgiluyeh and BoyerAhmad',
|
||
|
'GLS' => 'Golestan',
|
||
|
'GIL' => 'Gilan',
|
||
|
'MZN' => 'Mazandaran',
|
||
|
'MKZ' => 'Markazi',
|
||
|
'HRZ' => 'Hormozgan',
|
||
|
'SBN' => 'Sistan and Baluchestan'
|
||
|
);
|
||
|
|
||
|
return apply_filters( 'edd_iranian_states', $states );
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Get Italian Provinces
|
||
|
*
|
||
|
* @since 2.2.3
|
||
|
* @return array $states A list of states
|
||
|
*/
|
||
|
function edd_get_italian_states_list() {
|
||
|
$states = array(
|
||
|
'' => '',
|
||
|
'AG' => 'Agrigento',
|
||
|
'AL' => 'Alessandria',
|
||
|
'AN' => 'Ancona',
|
||
|
'AO' => 'Aosta',
|
||
|
'AR' => 'Arezzo',
|
||
|
'AP' => 'Ascoli Piceno',
|
||
|
'AT' => 'Asti',
|
||
|
'AV' => 'Avellino',
|
||
|
'BA' => 'Bari',
|
||
|
'BT' => 'Barletta-Andria-Trani',
|
||
|
'BL' => 'Belluno',
|
||
|
'BN' => 'Benevento',
|
||
|
'BG' => 'Bergamo',
|
||
|
'BI' => 'Biella',
|
||
|
'BO' => 'Bologna',
|
||
|
'BZ' => 'Bolzano',
|
||
|
'BS' => 'Brescia',
|
||
|
'BR' => 'Brindisi',
|
||
|
'CA' => 'Cagliari',
|
||
|
'CL' => 'Caltanissetta',
|
||
|
'CB' => 'Campobasso',
|
||
|
'CE' => 'Caserta',
|
||
|
'CT' => 'Catania',
|
||
|
'CZ' => 'Catanzaro',
|
||
|
'CH' => 'Chieti',
|
||
|
'CO' => 'Como',
|
||
|
'CS' => 'Cosenza',
|
||
|
'CR' => 'Cremona',
|
||
|
'KR' => 'Crotone',
|
||
|
'CN' => 'Cuneo',
|
||
|
'EN' => 'Enna',
|
||
|
'FM' => 'Fermo',
|
||
|
'FE' => 'Ferrara',
|
||
|
'FI' => 'Firenze',
|
||
|
'FG' => 'Foggia',
|
||
|
'FC' => 'Forli-Cesena',
|
||
|
'FR' => 'Frosinone',
|
||
|
'GE' => 'Genoa',
|
||
|
'GO' => 'Gorizia',
|
||
|
'GR' => 'Grosseto',
|
||
|
'IM' => 'Imperia',
|
||
|
'IS' => 'Isernia',
|
||
|
'SP' => 'La Spezia',
|
||
|
'AQ' => 'L'Aquila',
|
||
|
'LT' => 'Latina',
|
||
|
'LE' => 'Lecce',
|
||
|
'LC' => 'Lecco',
|
||
|
'LI' => 'Livorno',
|
||
|
'LO' => 'Lodi',
|
||
|
'LU' => 'Lucca',
|
||
|
'MC' => 'Macerata',
|
||
|
'MN' => 'Mantova',
|
||
|
'MS' => 'Massa-Carrara',
|
||
|
'MT' => 'Matera',
|
||
|
'ME' => 'Messina',
|
||
|
'MI' => 'Milano',
|
||
|
'MO' => 'Modena',
|
||
|
'MB' => 'Monza e della Brianza',
|
||
|
'NA' => 'Napoli',
|
||
|
'NO' => 'Novara',
|
||
|
'NU' => 'Nuoro',
|
||
|
'OT' => 'Olbia-Tempio',
|
||
|
'OR' => 'Oristano',
|
||
|
'PD' => 'Padova',
|
||
|
'PA' => 'Palermo',
|
||
|
'PR' => 'Parma',
|
||
|
'PV' => 'Pavia',
|
||
|
'PG' => 'Perugia',
|
||
|
'PU' => 'Pesaro e Urbino',
|
||
|
'PE' => 'Pescara',
|
||
|
'PC' => 'Piacenza',
|
||
|
'PI' => 'Pisa',
|
||
|
'PT' => 'Pistoia',
|
||
|
'PN' => 'Pordenone',
|
||
|
'PZ' => 'Potenza',
|
||
|
'PO' => 'Prato',
|
||
|
'RG' => 'Ragusa',
|
||
|
'RA' => 'Ravenna',
|
||
|
'RC' => 'Reggio Calabria',
|
||
|
'RE' => 'Reggio Emilia',
|
||
|
'RI' => 'Rieti',
|
||
|
'RN' => 'Rimini',
|
||
|
'RM' => 'Roma',
|
||
|
'RO' => 'Rovigo',
|
||
|
'SA' => 'Salerno',
|
||
|
'VS' => 'Medio Campidano',
|
||
|
'SS' => 'Sassari',
|
||
|
'SV' => 'Savona',
|
||
|
'SI' => 'Siena',
|
||
|
'SR' => 'Siracusa',
|
||
|
'SO' => 'Sondrio',
|
||
|
'TA' => 'Taranto',
|
||
|
'TE' => 'Teramo',
|
||
|
'TR' => 'Terni',
|
||
|
'TO' => 'Torino',
|
||
|
'OG' => 'Ogliastra',
|
||
|
'TP' => 'Trapani',
|
||
|
'TN' => 'Trento',
|
||
|
'TV' => 'Treviso',
|
||
|
'TS' => 'Trieste',
|
||
|
'UD' => 'Udine',
|
||
|
'VA' => 'Varesa',
|
||
|
'VE' => 'Venezia',
|
||
|
'VB' => 'Verbano-Cusio-Ossola',
|
||
|
'VC' => 'Vercelli',
|
||
|
'VR' => 'Verona',
|
||
|
'VV' => 'Vibo Valentia',
|
||
|
'VI' => 'Vicenza',
|
||
|
'VT' => 'Viterbo'
|
||
|
);
|
||
|
|
||
|
return apply_filters( 'edd_italian_states', $states );
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Get Malaysian States
|
||
|
*
|
||
|
* @since 1.6
|
||
|
* @return array $states A list of states
|
||
|
*/
|
||
|
function edd_get_malaysian_states_list() {
|
||
|
$states = array(
|
||
|
'' => '',
|
||
|
'JHR' => 'Johor',
|
||
|
'KDH' => 'Kedah',
|
||
|
'KTN' => 'Kelantan',
|
||
|
'MLK' => 'Melaka',
|
||
|
'NSN' => 'Negeri Sembilan',
|
||
|
'PHG' => 'Pahang',
|
||
|
'PRK' => 'Perak',
|
||
|
'PLS' => 'Perlis',
|
||
|
'PNG' => 'Pulau Pinang',
|
||
|
'SBH' => 'Sabah',
|
||
|
'SWK' => 'Sarawak',
|
||
|
'SGR' => 'Selangor',
|
||
|
'TRG' => 'Terengganu',
|
||
|
'KUL' => 'W.P. Kuala Lumpur',
|
||
|
'LBN' => 'W.P. Labuan',
|
||
|
'PJY' => 'W.P. Putrajaya'
|
||
|
);
|
||
|
|
||
|
return apply_filters( 'edd_malaysian_states', $states );
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Get Mexican States
|
||
|
*
|
||
|
* @since 2.2.3
|
||
|
* @return array $states A list of states
|
||
|
*/
|
||
|
function edd_get_mexican_states_list() {
|
||
|
$states = array(
|
||
|
'' => '',
|
||
|
'DIF' => 'Distrito Federal',
|
||
|
'JAL' => 'Jalisco',
|
||
|
'NLE' => 'Nuevo León',
|
||
|
'AGU' => 'Aguascalientes',
|
||
|
'BCN' => 'Baja California Norte',
|
||
|
'BCS' => 'Baja California Sur',
|
||
|
'CAM' => 'Campeche',
|
||
|
'CHP' => 'Chiapas',
|
||
|
'CHH' => 'Chihuahua',
|
||
|
'COA' => 'Coahuila',
|
||
|
'COL' => 'Colima',
|
||
|
'DUR' => 'Durango',
|
||
|
'GUA' => 'Guanajuato',
|
||
|
'GRO' => 'Guerrero',
|
||
|
'HID' => 'Hidalgo',
|
||
|
'MEX' => 'Edo. de México',
|
||
|
'MIC' => 'Michoacán',
|
||
|
'MOR' => 'Morelos',
|
||
|
'NAY' => 'Nayarit',
|
||
|
'OAX' => 'Oaxaca',
|
||
|
'PUE' => 'Puebla',
|
||
|
'QUE' => 'Querétaro',
|
||
|
'ROO' => 'Quintana Roo',
|
||
|
'SLP' => 'San Luis Potosí',
|
||
|
'SIN' => 'Sinaloa',
|
||
|
'SON' => 'Sonora',
|
||
|
'TAB' => 'Tabasco',
|
||
|
'TAM' => 'Tamaulipas',
|
||
|
'TLA' => 'Tlaxcala',
|
||
|
'VER' => 'Veracruz',
|
||
|
'YUC' => 'Yucatán',
|
||
|
'ZAC' => 'Zacatecas'
|
||
|
);
|
||
|
|
||
|
return apply_filters( 'edd_mexican_states', $states );
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Get Nepalese States (Districts)
|
||
|
*
|
||
|
* @since 2.2.3
|
||
|
* @return array $states A list of states
|
||
|
*/
|
||
|
function edd_get_nepalese_states_list() {
|
||
|
$states = array(
|
||
|
'' => '',
|
||
|
'ILL' => 'Illam',
|
||
|
'JHA' => 'Jhapa',
|
||
|
'PAN' => 'Panchthar',
|
||
|
'TAP' => 'Taplejung',
|
||
|
'BHO' => 'Bhojpur',
|
||
|
'DKA' => 'Dhankuta',
|
||
|
'MOR' => 'Morang',
|
||
|
'SUN' => 'Sunsari',
|
||
|
'SAN' => 'Sankhuwa',
|
||
|
'TER' => 'Terhathum',
|
||
|
'KHO' => 'Khotang',
|
||
|
'OKH' => 'Okhaldhunga',
|
||
|
'SAP' => 'Saptari',
|
||
|
'SIR' => 'Siraha',
|
||
|
'SOL' => 'Solukhumbu',
|
||
|
'UDA' => 'Udayapur',
|
||
|
'DHA' => 'Dhanusa',
|
||
|
'DLK' => 'Dolakha',
|
||
|
'MOH' => 'Mohottari',
|
||
|
'RAM' => 'Ramechha',
|
||
|
'SAR' => 'Sarlahi',
|
||
|
'SIN' => 'Sindhuli',
|
||
|
'BHA' => 'Bhaktapur',
|
||
|
'DHD' => 'Dhading',
|
||
|
'KTM' => 'Kathmandu',
|
||
|
'KAV' => 'Kavrepalanchowk',
|
||
|
'LAL' => 'Lalitpur',
|
||
|
'NUW' => 'Nuwakot',
|
||
|
'RAS' => 'Rasuwa',
|
||
|
'SPC' => 'Sindhupalchowk',
|
||
|
'BAR' => 'Bara',
|
||
|
'CHI' => 'Chitwan',
|
||
|
'MAK' => 'Makwanpur',
|
||
|
'PAR' => 'Parsa',
|
||
|
'RAU' => 'Rautahat',
|
||
|
'GOR' => 'Gorkha',
|
||
|
'KAS' => 'Kaski',
|
||
|
'LAM' => 'Lamjung',
|
||
|
'MAN' => 'Manang',
|
||
|
'SYN' => 'Syangja',
|
||
|
'TAN' => 'Tanahun',
|
||
|
'BAG' => 'Baglung',
|
||
|
'PBT' => 'Parbat',
|
||
|
'MUS' => 'Mustang',
|
||
|
'MYG' => 'Myagdi',
|
||
|
'AGR' => 'Agrghakanchi',
|
||
|
'GUL' => 'Gulmi',
|
||
|
'KAP' => 'Kapilbastu',
|
||
|
'NAW' => 'Nawalparasi',
|
||
|
'PAL' => 'Palpa',
|
||
|
'RUP' => 'Rupandehi',
|
||
|
'DAN' => 'Dang',
|
||
|
'PYU' => 'Pyuthan',
|
||
|
'ROL' => 'Rolpa',
|
||
|
'RUK' => 'Rukum',
|
||
|
'SAL' => 'Salyan',
|
||
|
'BAN' => 'Banke',
|
||
|
'BDA' => 'Bardiya',
|
||
|
'DAI' => 'Dailekh',
|
||
|
'JAJ' => 'Jajarkot',
|
||
|
'SUR' => 'Surkhet',
|
||
|
'DOL' => 'Dolpa',
|
||
|
'HUM' => 'Humla',
|
||
|
'JUM' => 'Jumla',
|
||
|
'KAL' => 'Kalikot',
|
||
|
'MUG' => 'Mugu',
|
||
|
'ACH' => 'Achham',
|
||
|
'BJH' => 'Bajhang',
|
||
|
'BJU' => 'Bajura',
|
||
|
'DOT' => 'Doti',
|
||
|
'KAI' => 'Kailali',
|
||
|
'BAI' => 'Baitadi',
|
||
|
'DAD' => 'Dadeldhura',
|
||
|
'DAR' => 'Darchula',
|
||
|
'KAN' => 'Kanchanpur'
|
||
|
);
|
||
|
|
||
|
return apply_filters( 'edd_nepalese_states', $states );
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Get South African States
|
||
|
*
|
||
|
* @since 1.6
|
||
|
* @return array $states A list of states
|
||
|
*/
|
||
|
function edd_get_south_african_states_list() {
|
||
|
$states = array(
|
||
|
'' => '',
|
||
|
'EC' => 'Eastern Cape',
|
||
|
'FS' => 'Free State',
|
||
|
'GP' => 'Gauteng',
|
||
|
'KZN' => 'KwaZulu-Natal',
|
||
|
'LP' => 'Limpopo',
|
||
|
'MP' => 'Mpumalanga',
|
||
|
'NC' => 'Northern Cape',
|
||
|
'NW' => 'North West',
|
||
|
'WC' => 'Western Cape'
|
||
|
);
|
||
|
|
||
|
return apply_filters( 'edd_south_african_states', $states );
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Get Thailand States
|
||
|
*
|
||
|
* @since 1.6
|
||
|
* @return array $states A list of states
|
||
|
*/
|
||
|
function edd_get_thailand_states_list() {
|
||
|
$states = array(
|
||
|
'' => '',
|
||
|
'TH-37' => 'Amnat Charoen (อำนาจเจริญ)',
|
||
|
'TH-15' => 'Ang Thong (อ่างทอง)',
|
||
|
'TH-14' => 'Ayutthaya (พระนครศรีอยุธยา)',
|
||
|
'TH-10' => 'Bangkok (กรุงเทพมหานคร)',
|
||
|
'TH-38' => 'Bueng Kan (บึงกาฬ)',
|
||
|
'TH-31' => 'Buri Ram (บุรีรัมย์)',
|
||
|
'TH-24' => 'Chachoengsao (ฉะเชิงเทรา)',
|
||
|
'TH-18' => 'Chai Nat (ชัยนาท)',
|
||
|
'TH-36' => 'Chaiyaphum (ชัยภูมิ)',
|
||
|
'TH-22' => 'Chanthaburi (จันทบุรี)',
|
||
|
'TH-50' => 'Chiang Mai (เชียงใหม่)',
|
||
|
'TH-57' => 'Chiang Rai (เชียงราย)',
|
||
|
'TH-20' => 'Chonburi (ชลบุรี)',
|
||
|
'TH-86' => 'Chumphon (ชุมพร)',
|
||
|
'TH-46' => 'Kalasin (กาฬสินธุ์)',
|
||
|
'TH-62' => 'Kamphaeng Phet (กำแพงเพชร)',
|
||
|
'TH-71' => 'Kanchanaburi (กาญจนบุรี)',
|
||
|
'TH-40' => 'Khon Kaen (ขอนแก่น)',
|
||
|
'TH-81' => 'Krabi (กระบี่)',
|
||
|
'TH-52' => 'Lampang (ลำปาง)',
|
||
|
'TH-51' => 'Lamphun (ลำพูน)',
|
||
|
'TH-42' => 'Loei (เลย)',
|
||
|
'TH-16' => 'Lopburi (ลพบุรี)',
|
||
|
'TH-58' => 'Mae Hong Son (แม่ฮ่องสอน)',
|
||
|
'TH-44' => 'Maha Sarakham (มหาสารคาม)',
|
||
|
'TH-49' => 'Mukdahan (มุกดาหาร)',
|
||
|
'TH-26' => 'Nakhon Nayok (นครนายก)',
|
||
|
'TH-73' => 'Nakhon Pathom (นครปฐม)',
|
||
|
'TH-48' => 'Nakhon Phanom (นครพนม)',
|
||
|
'TH-30' => 'Nakhon Ratchasima (นครราชสีมา)',
|
||
|
'TH-60' => 'Nakhon Sawan (นครสวรรค์)',
|
||
|
'TH-80' => 'Nakhon Si Thammarat (นครศรีธรรมราช)',
|
||
|
'TH-55' => 'Nan (น่าน)',
|
||
|
'TH-96' => 'Narathiwat (นราธิวาส)',
|
||
|
'TH-39' => 'Nong Bua Lam Phu (หนองบัวลำภู)',
|
||
|
'TH-43' => 'Nong Khai (หนองคาย)',
|
||
|
'TH-12' => 'Nonthaburi (นนทบุรี)',
|
||
|
'TH-13' => 'Pathum Thani (ปทุมธานี)',
|
||
|
'TH-94' => 'Pattani (ปัตตานี)',
|
||
|
'TH-82' => 'Phang Nga (พังงา)',
|
||
|
'TH-93' => 'Phatthalung (พัทลุง)',
|
||
|
'TH-56' => 'Phayao (พะเยา)',
|
||
|
'TH-67' => 'Phetchabun (เพชรบูรณ์)',
|
||
|
'TH-76' => 'Phetchaburi (เพชรบุรี)',
|
||
|
'TH-66' => 'Phichit (พิจิตร)',
|
||
|
'TH-65' => 'Phitsanulok (พิษณุโลก)',
|
||
|
'TH-54' => 'Phrae (แพร่)',
|
||
|
'TH-83' => 'Phuket (ภูเก็ต)',
|
||
|
'TH-25' => 'Prachin Buri (ปราจีนบุรี)',
|
||
|
'TH-77' => 'Prachuap Khiri Khan (ประจวบคีรีขันธ์)',
|
||
|
'TH-85' => 'Ranong (ระนอง)',
|
||
|
'TH-70' => 'Ratchaburi (ราชบุรี)',
|
||
|
'TH-21' => 'Rayong (ระยอง)',
|
||
|
'TH-45' => 'Roi Et (ร้อยเอ็ด)',
|
||
|
'TH-27' => 'Sa Kaeo (สระแก้ว)',
|
||
|
'TH-47' => 'Sakon Nakhon (สกลนคร)',
|
||
|
'TH-11' => 'Samut Prakan (สมุทรปราการ)',
|
||
|
'TH-74' => 'Samut Sakhon (สมุทรสาคร)',
|
||
|
'TH-75' => 'Samut Songkhram (สมุทรสงคราม)',
|
||
|
'TH-19' => 'Saraburi (สระบุรี)',
|
||
|
'TH-91' => 'Satun (สตูล)',
|
||
|
'TH-17' => 'Sing Buri (สิงห์บุรี)',
|
||
|
'TH-33' => 'Sisaket (ศรีสะเกษ)',
|
||
|
'TH-90' => 'Songkhla (สงขลา)',
|
||
|
'TH-64' => 'Sukhothai (สุโขทัย)',
|
||
|
'TH-72' => 'Suphan Buri (สุพรรณบุรี)',
|
||
|
'TH-84' => 'Surat Thani (สุราษฎร์ธานี)',
|
||
|
'TH-32' => 'Surin (สุรินทร์)',
|
||
|
'TH-63' => 'Tak (ตาก)',
|
||
|
'TH-92' => 'Trang (ตรัง)',
|
||
|
'TH-23' => 'Trat (ตราด)',
|
||
|
'TH-34' => 'Ubon Ratchathani (อุบลราชธานี)',
|
||
|
'TH-41' => 'Udon Thani (อุดรธานี)',
|
||
|
'TH-61' => 'Uthai Thani (อุทัยธานี)',
|
||
|
'TH-53' => 'Uttaradit (อุตรดิตถ์)',
|
||
|
'TH-95' => 'Yala (ยะลา)',
|
||
|
'TH-35' => 'Yasothon (ยโสธร)'
|
||
|
);
|
||
|
|
||
|
return apply_filters( 'edd_thailand_states', $states );
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Get Turkey States
|
||
|
*
|
||
|
* @since 2.2.3
|
||
|
* @return array $states A list of states
|
||
|
*/
|
||
|
function edd_get_turkey_states_list() {
|
||
|
$states = array(
|
||
|
'' => '',
|
||
|
'TR01' => 'Adana',
|
||
|
'TR02' => 'Adıyaman',
|
||
|
'TR03' => 'Afyon',
|
||
|
'TR04' => 'Ağrı',
|
||
|
'TR05' => 'Amasya',
|
||
|
'TR06' => 'Ankara',
|
||
|
'TR07' => 'Antalya',
|
||
|
'TR08' => 'Artvin',
|
||
|
'TR09' => 'Aydın',
|
||
|
'TR10' => 'Balıkesir',
|
||
|
'TR11' => 'Bilecik',
|
||
|
'TR12' => 'Bingöl',
|
||
|
'TR13' => 'Bitlis',
|
||
|
'TR14' => 'Bolu',
|
||
|
'TR15' => 'Burdur',
|
||
|
'TR16' => 'Bursa',
|
||
|
'TR17' => 'Çanakkale',
|
||
|
'TR18' => 'Çankıkesir',
|
||
|
'TR19' => 'Çorum',
|
||
|
'TR20' => 'Denizli',
|
||
|
'TR21' => 'Diyarbakır',
|
||
|
'TR22' => 'Edirne',
|
||
|
'TR23' => 'Elazığ',
|
||
|
'TR24' => 'Erzincan',
|
||
|
'TR25' => 'Erzurum',
|
||
|
'TR26' => 'Eskişehir',
|
||
|
'TR27' => 'Gaziantep',
|
||
|
'TR28' => 'Giresun',
|
||
|
'TR29' => 'Gümüşhane',
|
||
|
'TR30' => 'Hakkari',
|
||
|
'TR31' => 'Hatay',
|
||
|
'TR32' => 'Isparta',
|
||
|
'TR33' => 'İçel',
|
||
|
'TR34' => 'İstanbul',
|
||
|
'TR35' => 'İzmir',
|
||
|
'TR36' => 'Kars',
|
||
|
'TR37' => 'Kastamonu',
|
||
|
'TR38' => 'Kayseri',
|
||
|
'TR39' => 'Kırklareli',
|
||
|
'TR40' => 'Kırşehir',
|
||
|
'TR41' => 'Kocaeli',
|
||
|
'TR42' => 'Konya',
|
||
|
'TR43' => 'Kütahya',
|
||
|
'TR44' => 'Malatya',
|
||
|
'TR45' => 'Manisa',
|
||
|
'TR46' => 'Kahramanmaraş',
|
||
|
'TR47' => 'Mardin',
|
||
|
'TR48' => 'Muğla',
|
||
|
'TR49' => 'Muş',
|
||
|
'TR50' => 'Nevşehir',
|
||
|
'TR51' => 'Niğde',
|
||
|
'TR52' => 'Ordu',
|
||
|
'TR53' => 'Rize',
|
||
|
'TR54' => 'Sakarya',
|
||
|
'TR55' => 'Samsun',
|
||
|
'TR56' => 'Siirt',
|
||
|
'TR57' => 'Sinop',
|
||
|
'TR58' => 'Sivas',
|
||
|
'TR59' => 'Tekirdağ',
|
||
|
'TR60' => 'Tokat',
|
||
|
'TR61' => 'Trabzon',
|
||
|
'TR62' => 'Tunceli',
|
||
|
'TR63' => 'Şanlıurfa',
|
||
|
'TR64' => 'Uşak',
|
||
|
'TR65' => 'Van',
|
||
|
'TR66' => 'Yozgat',
|
||
|
'TR67' => 'Zonguldak',
|
||
|
'TR68' => 'Aksaray',
|
||
|
'TR69' => 'Bayburt',
|
||
|
'TR70' => 'Karaman',
|
||
|
'TR71' => 'Kırıkkale',
|
||
|
'TR72' => 'Batman',
|
||
|
'TR73' => 'Şırnak',
|
||
|
'TR74' => 'Bartın',
|
||
|
'TR75' => 'Ardahan',
|
||
|
'TR76' => 'Iğdır',
|
||
|
'TR77' => 'Yalova',
|
||
|
'TR78' => 'Karabük',
|
||
|
'TR79' => 'Kilis',
|
||
|
'TR80' => 'Osmaniye',
|
||
|
'TR81' => 'Düzce'
|
||
|
);
|
||
|
|
||
|
return apply_filters( 'edd_turkey_states', $states );
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Get Spain States
|
||
|
*
|
||
|
* @since 2.2
|
||
|
* @return array $states A list of states
|
||
|
*/
|
||
|
function edd_get_spain_states_list() {
|
||
|
$states = array(
|
||
|
'' => '',
|
||
|
'C' => __( 'A Coruña', 'easy-digital-downloads' ),
|
||
|
'VI' => __( 'Araba', 'easy-digital-downloads' ),
|
||
|
'AB' => __( 'Albacete', 'easy-digital-downloads' ),
|
||
|
'A' => __( 'Alicante', 'easy-digital-downloads' ),
|
||
|
'AL' => __( 'Almería', 'easy-digital-downloads' ),
|
||
|
'O' => __( 'Asturias', 'easy-digital-downloads' ),
|
||
|
'AV' => __( 'Ávila', 'easy-digital-downloads' ),
|
||
|
'BA' => __( 'Badajoz', 'easy-digital-downloads' ),
|
||
|
'PM' => __( 'Baleares', 'easy-digital-downloads' ),
|
||
|
'B' => __( 'Barcelona', 'easy-digital-downloads' ),
|
||
|
'BU' => __( 'Burgos', 'easy-digital-downloads' ),
|
||
|
'CC' => __( 'Cáceres', 'easy-digital-downloads' ),
|
||
|
'CA' => __( 'Cádiz', 'easy-digital-downloads' ),
|
||
|
'S' => __( 'Cantabria', 'easy-digital-downloads' ),
|
||
|
'CS' => __( 'Castellón', 'easy-digital-downloads' ),
|
||
|
'CE' => __( 'Ceuta', 'easy-digital-downloads' ),
|
||
|
'CR' => __( 'Ciudad Real', 'easy-digital-downloads' ),
|
||
|
'CO' => __( 'Córdoba', 'easy-digital-downloads' ),
|
||
|
'CU' => __( 'Cuenca', 'easy-digital-downloads' ),
|
||
|
'GI' => __( 'Girona', 'easy-digital-downloads' ),
|
||
|
'GR' => __( 'Granada', 'easy-digital-downloads' ),
|
||
|
'GU' => __( 'Guadalajara', 'easy-digital-downloads' ),
|
||
|
'SS' => __( 'Gipuzkoa', 'easy-digital-downloads' ),
|
||
|
'H' => __( 'Huelva', 'easy-digital-downloads' ),
|
||
|
'HU' => __( 'Huesca', 'easy-digital-downloads' ),
|
||
|
'J' => __( 'Jaén', 'easy-digital-downloads' ),
|
||
|
'LO' => __( 'La Rioja', 'easy-digital-downloads' ),
|
||
|
'GC' => __( 'Las Palmas', 'easy-digital-downloads' ),
|
||
|
'LE' => __( 'León', 'easy-digital-downloads' ),
|
||
|
'L' => __( 'Lleida', 'easy-digital-downloads' ),
|
||
|
'LU' => __( 'Lugo', 'easy-digital-downloads' ),
|
||
|
'M' => __( 'Madrid', 'easy-digital-downloads' ),
|
||
|
'MA' => __( 'Málaga', 'easy-digital-downloads' ),
|
||
|
'ML' => __( 'Melilla', 'easy-digital-downloads' ),
|
||
|
'MU' => __( 'Murcia', 'easy-digital-downloads' ),
|
||
|
'NA' => __( 'Navarra', 'easy-digital-downloads' ),
|
||
|
'OR' => __( 'Ourense', 'easy-digital-downloads' ),
|
||
|
'P' => __( 'Palencia', 'easy-digital-downloads' ),
|
||
|
'PO' => __( 'Pontevedra', 'easy-digital-downloads' ),
|
||
|
'SA' => __( 'Salamanca', 'easy-digital-downloads' ),
|
||
|
'TF' => __( 'Santa Cruz de Tenerife', 'easy-digital-downloads' ),
|
||
|
'SG' => __( 'Segovia', 'easy-digital-downloads' ),
|
||
|
'SE' => __( 'Sevilla', 'easy-digital-downloads' ),
|
||
|
'SO' => __( 'Soria', 'easy-digital-downloads' ),
|
||
|
'T' => __( 'Tarragona', 'easy-digital-downloads' ),
|
||
|
'TE' => __( 'Teruel', 'easy-digital-downloads' ),
|
||
|
'TO' => __( 'Toledo', 'easy-digital-downloads' ),
|
||
|
'V' => __( 'Valencia', 'easy-digital-downloads' ),
|
||
|
'VA' => __( 'Valladolid', 'easy-digital-downloads' ),
|
||
|
'BI' => __( 'Bizkaia', 'easy-digital-downloads' ),
|
||
|
'ZA' => __( 'Zamora', 'easy-digital-downloads' ),
|
||
|
'Z' => __( 'Zaragoza', 'easy-digital-downloads' )
|
||
|
);
|
||
|
|
||
|
return apply_filters( 'edd_spain_states', $states );
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Returns a list of Netherland's provinces.
|
||
|
*
|
||
|
* @since 3.0
|
||
|
* @return array $states A list of Netherland's provinces.
|
||
|
*/
|
||
|
function edd_get_netherlands_provinces_list() {
|
||
|
$provinces = array(
|
||
|
'' => '',
|
||
|
'DR' => __( 'Drenthe', 'easy-digital-downloads' ),
|
||
|
'FL' => __( 'Flevoland', 'easy-digital-downloads' ),
|
||
|
'FR' => __( 'Friesland', 'easy-digital-downloads' ),
|
||
|
'GE' => __( 'Gelderland', 'easy-digital-downloads' ),
|
||
|
'GR' => __( 'Groningen', 'easy-digital-downloads' ),
|
||
|
'LI' => __( 'Limburg', 'easy-digital-downloads' ),
|
||
|
'NB' => __( 'North Brabant', 'easy-digital-downloads' ),
|
||
|
'NH' => __( 'North Holland', 'easy-digital-downloads' ),
|
||
|
'OV' => __( 'Overijssel', 'easy-digital-downloads' ),
|
||
|
'ZH' => __( 'South Holland', 'easy-digital-downloads' ),
|
||
|
'UT' => __( 'Utrecht', 'easy-digital-downloads' ),
|
||
|
'ZE' => __( 'Zeeland', 'easy-digital-downloads' ),
|
||
|
|
||
|
// Caribbean Netherland
|
||
|
'BO' => __( 'Bonaire', 'easy-digital-downloads' ),
|
||
|
'SA' => __( 'Saba', 'easy-digital-downloads' ),
|
||
|
'SE' => __( 'Sint Eustatius', 'easy-digital-downloads' ),
|
||
|
);
|
||
|
|
||
|
/**
|
||
|
* Filters the list of Netherland's provinces.
|
||
|
*
|
||
|
* @since 3.0
|
||
|
*
|
||
|
* @param array $states A list of Netherland's provinces.
|
||
|
*/
|
||
|
$provinces = apply_filters( 'edd_netherlands_provinces', $provinces );
|
||
|
|
||
|
return $provinces;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Given a country code, return the country name
|
||
|
*
|
||
|
* @since 2.8.7
|
||
|
* @param string $country_code The ISO Code for the country
|
||
|
*
|
||
|
* @return string
|
||
|
*/
|
||
|
function edd_get_country_name( $country_code = '' ) {
|
||
|
$country_list = edd_get_country_list();
|
||
|
$country_name = isset( $country_list[ $country_code ] ) ? $country_list[ $country_code ] : $country_code;
|
||
|
|
||
|
return apply_filters( 'edd_get_country_name', $country_name, $country_code );
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Given a country and state code, return the state name
|
||
|
*
|
||
|
* @since 2.9
|
||
|
* @param string $country_code The ISO Code for the country
|
||
|
* @param string $state_code The ISO Code for the state
|
||
|
*
|
||
|
* @return string
|
||
|
*/
|
||
|
function edd_get_state_name( $country_code = '', $state_code = '' ) {
|
||
|
$states_list = edd_get_shop_states( $country_code );
|
||
|
$state_name = isset( $states_list[ $state_code ] ) ? $states_list[ $state_code ] : $state_code;
|
||
|
|
||
|
return apply_filters( 'edd_get_state_name', $state_name, $state_code );
|
||
|
}
|