| 1 |
<?php |
| 2 |
/** |
| 3 |
* Country Functions |
| 4 |
* |
| 5 |
* @package Give |
| 6 |
* @subpackage Functions |
| 7 |
* @copyright Copyright (c) 2016, GiveWP |
| 8 |
* @license https://opensource.org/licenses/gpl-license GNU Public License |
| 9 |
* @since 1.0 |
| 10 |
*/ |
| 11 |
|
| 12 |
// Exit if accessed directly. |
| 13 |
if ( ! defined( 'ABSPATH' ) ) { |
| 14 |
exit; |
| 15 |
} |
| 16 |
|
| 17 |
/** |
| 18 |
* Get Site Base Country |
| 19 |
* |
| 20 |
* @since 1.0 |
| 21 |
* @return string $country The two letter country code for the site's base country |
| 22 |
*/ |
| 23 |
function give_get_country() { |
| 24 |
$give_options = give_get_settings(); |
| 25 |
$country = isset( $give_options['base_country'] ) ? $give_options['base_country'] : 'US'; |
| 26 |
|
| 27 |
return apply_filters( 'give_give_country', $country ); |
| 28 |
} |
| 29 |
|
| 30 |
/** |
| 31 |
* Get Site Base State |
| 32 |
* |
| 33 |
* @since 1.0 |
| 34 |
* @return string $state The site's base state name |
| 35 |
*/ |
| 36 |
function give_get_state() { |
| 37 |
$give_options = give_get_settings(); |
| 38 |
$state = isset( $give_options['base_state'] ) ? $give_options['base_state'] : false; |
| 39 |
|
| 40 |
return apply_filters( 'give_give_state', $state ); |
| 41 |
} |
| 42 |
|
| 43 |
/** |
| 44 |
* Get Site States |
| 45 |
* |
| 46 |
* @since 1.0 |
| 47 |
* |
| 48 |
* @param null $country |
| 49 |
* |
| 50 |
* @return mixed A list of states for the site's base country. |
| 51 |
*/ |
| 52 |
function give_get_states( $country = null ) { |
| 53 |
// If Country have no states return empty array. |
| 54 |
$states = []; |
| 55 |
|
| 56 |
// Check if Country Code is empty or not. |
| 57 |
if ( empty( $country ) ) { |
| 58 |
// Get default country code that is being set by the admin. |
| 59 |
$country = give_get_country(); |
| 60 |
} |
| 61 |
|
| 62 |
// Get all the list of the states in array key format where key is the country code and value is the states that it contain. |
| 63 |
$states_list = give_states_list(); |
| 64 |
|
| 65 |
// Check if $country code exists in the array key. |
| 66 |
if ( array_key_exists( $country, $states_list ) ) { |
| 67 |
$states = $states_list[ $country ]; |
| 68 |
} |
| 69 |
|
| 70 |
/** |
| 71 |
* Filter the query in case tables are non-standard. |
| 72 |
* |
| 73 |
* @param string $query Database count query |
| 74 |
*/ |
| 75 |
return (array) apply_filters( 'give_give_states', $states ); |
| 76 |
} |
| 77 |
|
| 78 |
/** |
| 79 |
* Get Country List |
| 80 |
* |
| 81 |
* @since 1.0 |
| 82 |
* @return array $countries A list of the available countries. |
| 83 |
*/ |
| 84 |
function give_get_country_list() { |
| 85 |
$countries = [ |
| 86 |
'' => '', |
| 87 |
'US' => esc_html__( 'United States', 'give' ), |
| 88 |
'CA' => esc_html__( 'Canada', 'give' ), |
| 89 |
'GB' => esc_html__( 'United Kingdom', 'give' ), |
| 90 |
'AF' => esc_html__( 'Afghanistan', 'give' ), |
| 91 |
'AL' => esc_html__( 'Albania', 'give' ), |
| 92 |
'DZ' => esc_html__( 'Algeria', 'give' ), |
| 93 |
'AS' => esc_html__( 'American Samoa', 'give' ), |
| 94 |
'AD' => esc_html__( 'Andorra', 'give' ), |
| 95 |
'AO' => esc_html__( 'Angola', 'give' ), |
| 96 |
'AI' => esc_html__( 'Anguilla', 'give' ), |
| 97 |
'AQ' => esc_html__( 'Antarctica', 'give' ), |
| 98 |
'AG' => esc_html__( 'Antigua and Barbuda', 'give' ), |
| 99 |
'AR' => esc_html__( 'Argentina', 'give' ), |
| 100 |
'AM' => esc_html__( 'Armenia', 'give' ), |
| 101 |
'AW' => esc_html__( 'Aruba', 'give' ), |
| 102 |
'AU' => esc_html__( 'Australia', 'give' ), |
| 103 |
'AT' => esc_html__( 'Austria', 'give' ), |
| 104 |
'AZ' => esc_html__( 'Azerbaijan', 'give' ), |
| 105 |
'BS' => esc_html__( 'Bahamas', 'give' ), |
| 106 |
'BH' => esc_html__( 'Bahrain', 'give' ), |
| 107 |
'BD' => esc_html__( 'Bangladesh', 'give' ), |
| 108 |
'BB' => esc_html__( 'Barbados', 'give' ), |
| 109 |
'BY' => esc_html__( 'Belarus', 'give' ), |
| 110 |
'BE' => esc_html__( 'Belgium', 'give' ), |
| 111 |
'BZ' => esc_html__( 'Belize', 'give' ), |
| 112 |
'BJ' => esc_html__( 'Benin', 'give' ), |
| 113 |
'BM' => esc_html__( 'Bermuda', 'give' ), |
| 114 |
'BT' => esc_html__( 'Bhutan', 'give' ), |
| 115 |
'BO' => esc_html__( 'Bolivia', 'give' ), |
| 116 |
'BA' => esc_html__( 'Bosnia and Herzegovina', 'give' ), |
| 117 |
'BW' => esc_html__( 'Botswana', 'give' ), |
| 118 |
'BV' => esc_html__( 'Bouvet Island', 'give' ), |
| 119 |
'BR' => esc_html__( 'Brazil', 'give' ), |
| 120 |
'IO' => esc_html__( 'British Indian Ocean Territory', 'give' ), |
| 121 |
'BN' => esc_html__( 'Brunei Darrussalam', 'give' ), |
| 122 |
'BG' => esc_html__( 'Bulgaria', 'give' ), |
| 123 |
'BF' => esc_html__( 'Burkina Faso', 'give' ), |
| 124 |
'BI' => esc_html__( 'Burundi', 'give' ), |
| 125 |
'KH' => esc_html__( 'Cambodia', 'give' ), |
| 126 |
'CM' => esc_html__( 'Cameroon', 'give' ), |
| 127 |
'CV' => esc_html__( 'Cape Verde', 'give' ), |
| 128 |
'KY' => esc_html__( 'Cayman Islands', 'give' ), |
| 129 |
'CF' => esc_html__( 'Central African Republic', 'give' ), |
| 130 |
'TD' => esc_html__( 'Chad', 'give' ), |
| 131 |
'CL' => esc_html__( 'Chile', 'give' ), |
| 132 |
'CN' => esc_html__( 'China', 'give' ), |
| 133 |
'CX' => esc_html__( 'Christmas Island', 'give' ), |
| 134 |
'CC' => esc_html__( 'Cocos Islands', 'give' ), |
| 135 |
'CO' => esc_html__( 'Colombia', 'give' ), |
| 136 |
'KM' => esc_html__( 'Comoros', 'give' ), |
| 137 |
'CD' => esc_html__( 'Congo, Democratic People\'s Republic', 'give' ), |
| 138 |
'CG' => esc_html__( 'Congo, Republic of', 'give' ), |
| 139 |
'CK' => esc_html__( 'Cook Islands', 'give' ), |
| 140 |
'CR' => esc_html__( 'Costa Rica', 'give' ), |
| 141 |
'CI' => esc_html__( 'Cote d\'Ivoire', 'give' ), |
| 142 |
'HR' => esc_html__( 'Croatia/Hrvatska', 'give' ), |
| 143 |
'CU' => esc_html__( 'Cuba', 'give' ), |
| 144 |
'CW' => esc_html__( 'Curaçao', 'give' ), |
| 145 |
'CY' => esc_html__( 'Cyprus Island', 'give' ), |
| 146 |
'CZ' => esc_html__( 'Czech Republic', 'give' ), |
| 147 |
'DK' => esc_html__( 'Denmark', 'give' ), |
| 148 |
'DJ' => esc_html__( 'Djibouti', 'give' ), |
| 149 |
'DM' => esc_html__( 'Dominica', 'give' ), |
| 150 |
'DO' => esc_html__( 'Dominican Republic', 'give' ), |
| 151 |
'TP' => esc_html__( 'East Timor', 'give' ), |
| 152 |
'EC' => esc_html__( 'Ecuador', 'give' ), |
| 153 |
'EG' => esc_html__( 'Egypt', 'give' ), |
| 154 |
'GQ' => esc_html__( 'Equatorial Guinea', 'give' ), |
| 155 |
'SV' => esc_html__( 'El Salvador', 'give' ), |
| 156 |
'ER' => esc_html__( 'Eritrea', 'give' ), |
| 157 |
'EE' => esc_html__( 'Estonia', 'give' ), |
| 158 |
'ET' => esc_html__( 'Ethiopia', 'give' ), |
| 159 |
'FK' => esc_html__( 'Falkland Islands', 'give' ), |
| 160 |
'FO' => esc_html__( 'Faroe Islands', 'give' ), |
| 161 |
'FJ' => esc_html__( 'Fiji', 'give' ), |
| 162 |
'FI' => esc_html__( 'Finland', 'give' ), |
| 163 |
'FR' => esc_html__( 'France', 'give' ), |
| 164 |
'GF' => esc_html__( 'French Guiana', 'give' ), |
| 165 |
'PF' => esc_html__( 'French Polynesia', 'give' ), |
| 166 |
'TF' => esc_html__( 'French Southern Territories', 'give' ), |
| 167 |
'GA' => esc_html__( 'Gabon', 'give' ), |
| 168 |
'GM' => esc_html__( 'Gambia', 'give' ), |
| 169 |
'GE' => esc_html__( 'Georgia', 'give' ), |
| 170 |
'DE' => esc_html__( 'Germany', 'give' ), |
| 171 |
'GR' => esc_html__( 'Greece', 'give' ), |
| 172 |
'GH' => esc_html__( 'Ghana', 'give' ), |
| 173 |
'GI' => esc_html__( 'Gibraltar', 'give' ), |
| 174 |
'GL' => esc_html__( 'Greenland', 'give' ), |
| 175 |
'GD' => esc_html__( 'Grenada', 'give' ), |
| 176 |
'GP' => esc_html__( 'Guadeloupe', 'give' ), |
| 177 |
'GU' => esc_html__( 'Guam', 'give' ), |
| 178 |
'GT' => esc_html__( 'Guatemala', 'give' ), |
| 179 |
'GG' => esc_html__( 'Guernsey', 'give' ), |
| 180 |
'GN' => esc_html__( 'Guinea', 'give' ), |
| 181 |
'GW' => esc_html__( 'Guinea-Bissau', 'give' ), |
| 182 |
'GY' => esc_html__( 'Guyana', 'give' ), |
| 183 |
'HT' => esc_html__( 'Haiti', 'give' ), |
| 184 |
'HM' => esc_html__( 'Heard and McDonald Islands', 'give' ), |
| 185 |
'VA' => esc_html__( 'Holy See (City Vatican State)', 'give' ), |
| 186 |
'HN' => esc_html__( 'Honduras', 'give' ), |
| 187 |
'HK' => esc_html__( 'Hong Kong', 'give' ), |
| 188 |
'HU' => esc_html__( 'Hungary', 'give' ), |
| 189 |
'IS' => esc_html__( 'Iceland', 'give' ), |
| 190 |
'IN' => esc_html__( 'India', 'give' ), |
| 191 |
'ID' => esc_html__( 'Indonesia', 'give' ), |
| 192 |
'IR' => esc_html__( 'Iran', 'give' ), |
| 193 |
'IQ' => esc_html__( 'Iraq', 'give' ), |
| 194 |
'IE' => esc_html__( 'Ireland', 'give' ), |
| 195 |
'IM' => esc_html__( 'Isle of Man', 'give' ), |
| 196 |
'IL' => esc_html__( 'Israel', 'give' ), |
| 197 |
'IT' => esc_html__( 'Italy', 'give' ), |
| 198 |
'JM' => esc_html__( 'Jamaica', 'give' ), |
| 199 |
'JP' => esc_html__( 'Japan', 'give' ), |
| 200 |
'JE' => esc_html__( 'Jersey', 'give' ), |
| 201 |
'JO' => esc_html__( 'Jordan', 'give' ), |
| 202 |
'KZ' => esc_html__( 'Kazakhstan', 'give' ), |
| 203 |
'KE' => esc_html__( 'Kenya', 'give' ), |
| 204 |
'KI' => esc_html__( 'Kiribati', 'give' ), |
| 205 |
'KW' => esc_html__( 'Kuwait', 'give' ), |
| 206 |
'KG' => esc_html__( 'Kyrgyzstan', 'give' ), |
| 207 |
'LA' => esc_html__( 'Lao People\'s Democratic Republic', 'give' ), |
| 208 |
'LV' => esc_html__( 'Latvia', 'give' ), |
| 209 |
'LB' => esc_html__( 'Lebanon', 'give' ), |
| 210 |
'LS' => esc_html__( 'Lesotho', 'give' ), |
| 211 |
'LR' => esc_html__( 'Liberia', 'give' ), |
| 212 |
'LY' => esc_html__( 'Libyan Arab Jamahiriya', 'give' ), |
| 213 |
'LI' => esc_html__( 'Liechtenstein', 'give' ), |
| 214 |
'LT' => esc_html__( 'Lithuania', 'give' ), |
| 215 |
'LU' => esc_html__( 'Luxembourg', 'give' ), |
| 216 |
'MO' => esc_html__( 'Macau', 'give' ), |
| 217 |
'MK' => esc_html__( 'Macedonia', 'give' ), |
| 218 |
'MG' => esc_html__( 'Madagascar', 'give' ), |
| 219 |
'MW' => esc_html__( 'Malawi', 'give' ), |
| 220 |
'MY' => esc_html__( 'Malaysia', 'give' ), |
| 221 |
'MV' => esc_html__( 'Maldives', 'give' ), |
| 222 |
'ML' => esc_html__( 'Mali', 'give' ), |
| 223 |
'MT' => esc_html__( 'Malta', 'give' ), |
| 224 |
'MH' => esc_html__( 'Marshall Islands', 'give' ), |
| 225 |
'MQ' => esc_html__( 'Martinique', 'give' ), |
| 226 |
'MR' => esc_html__( 'Mauritania', 'give' ), |
| 227 |
'MU' => esc_html__( 'Mauritius', 'give' ), |
| 228 |
'YT' => esc_html__( 'Mayotte', 'give' ), |
| 229 |
'MX' => esc_html__( 'Mexico', 'give' ), |
| 230 |
'FM' => esc_html__( 'Micronesia', 'give' ), |
| 231 |
'MD' => esc_html__( 'Moldova, Republic of', 'give' ), |
| 232 |
'MC' => esc_html__( 'Monaco', 'give' ), |
| 233 |
'MN' => esc_html__( 'Mongolia', 'give' ), |
| 234 |
'ME' => esc_html__( 'Montenegro', 'give' ), |
| 235 |
'MS' => esc_html__( 'Montserrat', 'give' ), |
| 236 |
'MA' => esc_html__( 'Morocco', 'give' ), |
| 237 |
'MZ' => esc_html__( 'Mozambique', 'give' ), |
| 238 |
'MM' => esc_html__( 'Myanmar', 'give' ), |
| 239 |
'NA' => esc_html__( 'Namibia', 'give' ), |
| 240 |
'NR' => esc_html__( 'Nauru', 'give' ), |
| 241 |
'NP' => esc_html__( 'Nepal', 'give' ), |
| 242 |
'NL' => esc_html__('Netherlands', 'give'), |
| 243 |
'NC' => esc_html__( 'New Caledonia', 'give' ), |
| 244 |
'NZ' => esc_html__( 'New Zealand', 'give' ), |
| 245 |
'NI' => esc_html__( 'Nicaragua', 'give' ), |
| 246 |
'NE' => esc_html__( 'Niger', 'give' ), |
| 247 |
'NG' => esc_html__( 'Nigeria', 'give' ), |
| 248 |
'NU' => esc_html__( 'Niue', 'give' ), |
| 249 |
'NF' => esc_html__( 'Norfolk Island', 'give' ), |
| 250 |
'KP' => esc_html__( 'North Korea', 'give' ), |
| 251 |
'MP' => esc_html__( 'Northern Mariana Islands', 'give' ), |
| 252 |
'NO' => esc_html__( 'Norway', 'give' ), |
| 253 |
'OM' => esc_html__( 'Oman', 'give' ), |
| 254 |
'PK' => esc_html__( 'Pakistan', 'give' ), |
| 255 |
'PW' => esc_html__( 'Palau', 'give' ), |
| 256 |
'PS' => esc_html__( 'Palestinian Territories', 'give' ), |
| 257 |
'PA' => esc_html__( 'Panama', 'give' ), |
| 258 |
'PG' => esc_html__( 'Papua New Guinea', 'give' ), |
| 259 |
'PY' => esc_html__( 'Paraguay', 'give' ), |
| 260 |
'PE' => esc_html__( 'Peru', 'give' ), |
| 261 |
'PH' => esc_html__( 'Philippines', 'give' ), |
| 262 |
'PN' => esc_html__( 'Pitcairn Island', 'give' ), |
| 263 |
'PL' => esc_html__( 'Poland', 'give' ), |
| 264 |
'PT' => esc_html__( 'Portugal', 'give' ), |
| 265 |
'PR' => esc_html__( 'Puerto Rico', 'give' ), |
| 266 |
'QA' => esc_html__( 'Qatar', 'give' ), |
| 267 |
'RE' => esc_html__( 'Reunion Island', 'give' ), |
| 268 |
'RO' => esc_html__( 'Romania', 'give' ), |
| 269 |
'RU' => esc_html__( 'Russian Federation', 'give' ), |
| 270 |
'RW' => esc_html__( 'Rwanda', 'give' ), |
| 271 |
'SH' => esc_html__( 'Saint Helena', 'give' ), |
| 272 |
'KN' => esc_html__( 'Saint Kitts and Nevis', 'give' ), |
| 273 |
'LC' => esc_html__( 'Saint Lucia', 'give' ), |
| 274 |
'PM' => esc_html__( 'Saint Pierre and Miquelon', 'give' ), |
| 275 |
'VC' => esc_html__( 'Saint Vincent and the Grenadines', 'give' ), |
| 276 |
'SM' => esc_html__( 'San Marino', 'give' ), |
| 277 |
'ST' => esc_html__( 'Sao Tome and Principe', 'give' ), |
| 278 |
'SA' => esc_html__( 'Saudi Arabia', 'give' ), |
| 279 |
'SN' => esc_html__( 'Senegal', 'give' ), |
| 280 |
'RS' => esc_html__( 'Serbia', 'give' ), |
| 281 |
'SC' => esc_html__( 'Seychelles', 'give' ), |
| 282 |
'SL' => esc_html__( 'Sierra Leone', 'give' ), |
| 283 |
'SG' => esc_html__( 'Singapore', 'give' ), |
| 284 |
'SK' => esc_html__( 'Slovak Republic', 'give' ), |
| 285 |
'SI' => esc_html__( 'Slovenia', 'give' ), |
| 286 |
'SB' => esc_html__( 'Solomon Islands', 'give' ), |
| 287 |
'SO' => esc_html__( 'Somalia', 'give' ), |
| 288 |
'ZA' => esc_html__( 'South Africa', 'give' ), |
| 289 |
'GS' => esc_html__( 'South Georgia', 'give' ), |
| 290 |
'KR' => esc_html__( 'South Korea', 'give' ), |
| 291 |
'ES' => esc_html__( 'Spain', 'give' ), |
| 292 |
'LK' => esc_html__( 'Sri Lanka', 'give' ), |
| 293 |
'SD' => esc_html__( 'Sudan', 'give' ), |
| 294 |
'SR' => esc_html__( 'Suriname', 'give' ), |
| 295 |
'SJ' => esc_html__( 'Svalbard and Jan Mayen Islands', 'give' ), |
| 296 |
'SZ' => esc_html__( 'Eswatini', 'give' ), |
| 297 |
'SE' => esc_html__( 'Sweden', 'give' ), |
| 298 |
'CH' => esc_html__( 'Switzerland', 'give' ), |
| 299 |
'SY' => esc_html__( 'Syrian Arab Republic', 'give' ), |
| 300 |
'TW' => esc_html__( 'Taiwan', 'give' ), |
| 301 |
'TJ' => esc_html__( 'Tajikistan', 'give' ), |
| 302 |
'TZ' => esc_html__( 'Tanzania', 'give' ), |
| 303 |
'TG' => esc_html__( 'Togo', 'give' ), |
| 304 |
'TK' => esc_html__( 'Tokelau', 'give' ), |
| 305 |
'TO' => esc_html__( 'Tonga', 'give' ), |
| 306 |
'TH' => esc_html__( 'Thailand', 'give' ), |
| 307 |
'TT' => esc_html__( 'Trinidad and Tobago', 'give' ), |
| 308 |
'TN' => esc_html__( 'Tunisia', 'give' ), |
| 309 |
'TR' => esc_html__( 'Turkey', 'give' ), |
| 310 |
'TM' => esc_html__( 'Turkmenistan', 'give' ), |
| 311 |
'TC' => esc_html__( 'Turks and Caicos Islands', 'give' ), |
| 312 |
'TV' => esc_html__( 'Tuvalu', 'give' ), |
| 313 |
'UG' => esc_html__( 'Uganda', 'give' ), |
| 314 |
'UA' => esc_html__( 'Ukraine', 'give' ), |
| 315 |
'AE' => esc_html__( 'United Arab Emirates', 'give' ), |
| 316 |
'UY' => esc_html__( 'Uruguay', 'give' ), |
| 317 |
'UM' => esc_html__( 'US Minor Outlying Islands', 'give' ), |
| 318 |
'UZ' => esc_html__( 'Uzbekistan', 'give' ), |
| 319 |
'VU' => esc_html__( 'Vanuatu', 'give' ), |
| 320 |
'VE' => esc_html__( 'Venezuela', 'give' ), |
| 321 |
'VN' => esc_html__( 'Vietnam', 'give' ), |
| 322 |
'VG' => esc_html__( 'Virgin Islands (British)', 'give' ), |
| 323 |
'VI' => esc_html__( 'Virgin Islands (USA)', 'give' ), |
| 324 |
'WF' => esc_html__( 'Wallis and Futuna Islands', 'give' ), |
| 325 |
'EH' => esc_html__( 'Western Sahara', 'give' ), |
| 326 |
'WS' => esc_html__( 'Western Samoa', 'give' ), |
| 327 |
'YE' => esc_html__( 'Yemen', 'give' ), |
| 328 |
'YU' => esc_html__( 'Yugoslavia', 'give' ), |
| 329 |
'ZM' => esc_html__( 'Zambia', 'give' ), |
| 330 |
'ZW' => esc_html__( 'Zimbabwe', 'give' ), |
| 331 |
]; |
| 332 |
|
| 333 |
return (array) apply_filters( 'give_countries', $countries ); |
| 334 |
} |
| 335 |
|
| 336 |
/** |
| 337 |
* Get States List. |
| 338 |
* |
| 339 |
* @since 1.8.11 |
| 340 |
* |
| 341 |
* @return array $states A list of the available states as in array key format. |
| 342 |
*/ |
| 343 |
function give_states_list() { |
| 344 |
$states = [ |
| 345 |
'US' => give_get_states_list(), |
| 346 |
'CA' => give_get_provinces_list(), |
| 347 |
'AU' => give_get_australian_states_list(), |
| 348 |
'BR' => give_get_brazil_states_list(), |
| 349 |
'CN' => give_get_chinese_states_list(), |
| 350 |
'HK' => give_get_hong_kong_states_list(), |
| 351 |
'HU' => give_get_hungary_states_list(), |
| 352 |
'ID' => give_get_indonesian_states_list(), |
| 353 |
'IN' => give_get_indian_states_list(), |
| 354 |
'MY' => give_get_malaysian_states_list(), |
| 355 |
'NZ' => give_get_new_zealand_states_list(), |
| 356 |
'TH' => give_get_thailand_states_list(), |
| 357 |
'ZA' => give_get_south_african_states_list(), |
| 358 |
'ES' => give_get_spain_states_list(), |
| 359 |
'TR' => give_get_turkey_states_list(), |
| 360 |
'RO' => give_get_romania_states_list(), |
| 361 |
'PK' => give_get_pakistan_states_list(), |
| 362 |
'PH' => give_get_philippines_states_list(), |
| 363 |
'PE' => give_get_peru_states_list(), |
| 364 |
'NP' => give_get_nepal_states_list(), |
| 365 |
'NG' => give_get_nigerian_states_list(), |
| 366 |
'MX' => give_get_mexico_states_list(), |
| 367 |
'JP' => give_get_japan_states_list(), |
| 368 |
'IT' => give_get_italy_states_list(), |
| 369 |
'IR' => give_get_iran_states_list(), |
| 370 |
'IE' => give_get_ireland_states_list(), |
| 371 |
'GR' => give_get_greek_states_list(), |
| 372 |
'BO' => give_get_bolivian_states_list(), |
| 373 |
'BG' => give_get_bulgarian_states_list(), |
| 374 |
'BD' => give_get_bangladeshi_states_list(), |
| 375 |
'AR' => give_get_argentina_states_list(), |
| 376 |
]; |
| 377 |
|
| 378 |
/** |
| 379 |
* Filter can be used to add or remove the States from the Country. |
| 380 |
* |
| 381 |
* Filters can be use to add states inside the country all the states will be in array format ans the array key will be country code. |
| 382 |
* |
| 383 |
* @since 1.8.11 |
| 384 |
* |
| 385 |
* @param array $states Contain the list of states in array key format where key of the array is there respected country code. |
| 386 |
*/ |
| 387 |
return (array) apply_filters( 'give_states_list', $states ); |
| 388 |
} |
| 389 |
|
| 390 |
/** |
| 391 |
* List of Country that have no states init. |
| 392 |
* |
| 393 |
* There are some country which does not have states init Example: germany. |
| 394 |
* |
| 395 |
* @since 1.8.11 |
| 396 |
* |
| 397 |
* $$country array $country_code. |
| 398 |
*/ |
| 399 |
function give_no_states_country_list() { |
| 400 |
$country_list = []; |
| 401 |
$locale = give_get_country_locale(); |
| 402 |
foreach ( $locale as $key => $value ) { |
| 403 |
if ( ! empty( $value['state'] ) && isset( $value['state']['hidden'] ) && true === $value['state']['hidden'] ) { |
| 404 |
$country_list[ $key ] = $value['state']; |
| 405 |
} |
| 406 |
} |
| 407 |
|
| 408 |
/** |
| 409 |
* Filter can be used to add or remove the Country that does not have states init. |
| 410 |
* |
| 411 |
* @since 1.8.11 |
| 412 |
* |
| 413 |
* @param array $country Contain key as there country code & value as there country name. |
| 414 |
*/ |
| 415 |
return (array) apply_filters( 'give_no_states_country_list', $country_list ); |
| 416 |
} |
| 417 |
|
| 418 |
/** |
| 419 |
* List of Country in which states fields is not required. |
| 420 |
* |
| 421 |
* There are some country in which states fields is not required Example: United Kingdom ( uk ). |
| 422 |
* |
| 423 |
* @since 1.8.11 |
| 424 |
* |
| 425 |
* $country array $country_code. |
| 426 |
*/ |
| 427 |
function give_states_not_required_country_list() { |
| 428 |
$country_list = []; |
| 429 |
$locale = give_get_country_locale(); |
| 430 |
foreach ( $locale as $key => $value ) { |
| 431 |
if ( ! empty( $value['state'] ) && isset( $value['state']['required'] ) && false === $value['state']['required'] ) { |
| 432 |
$country_list[ $key ] = $value['state']; |
| 433 |
} |
| 434 |
} |
| 435 |
|
| 436 |
/** |
| 437 |
* Filter can be used to add or remove the Country in which states fields is not required. |
| 438 |
* |
| 439 |
* @since 1.8.11 |
| 440 |
* |
| 441 |
* @param array $country Contain key as there country code & value as there country name. |
| 442 |
*/ |
| 443 |
return (array) apply_filters( 'give_states_not_required_country_list', $country_list ); |
| 444 |
} |
| 445 |
|
| 446 |
/** |
| 447 |
* List of Country in which city fields is not required. |
| 448 |
* |
| 449 |
* There are some country in which city fields is not required Example: Singapore ( sk ). |
| 450 |
* |
| 451 |
* @since 2.3.0 |
| 452 |
* |
| 453 |
* $country array $country_list. |
| 454 |
*/ |
| 455 |
function give_city_not_required_country_list() { |
| 456 |
$country_list = []; |
| 457 |
$locale = give_get_country_locale(); |
| 458 |
foreach ( $locale as $key => $value ) { |
| 459 |
if ( ! empty( $value['city'] ) && isset( $value['city']['required'] ) && false === $value['city']['required'] ) { |
| 460 |
$country_list[ $key ] = $value['city']; |
| 461 |
} |
| 462 |
} |
| 463 |
|
| 464 |
/** |
| 465 |
* Filter can be used to add or remove the Country in which city fields is not required. |
| 466 |
* |
| 467 |
* @since 2.3.0 |
| 468 |
* |
| 469 |
* @param array $country_list Contain key as there country code & value as there country name. |
| 470 |
*/ |
| 471 |
return (array) apply_filters( 'give_city_not_required_country_list', $country_list ); |
| 472 |
} |
| 473 |
|
| 474 |
/** |
| 475 |
* Get the country name by list key. |
| 476 |
* |
| 477 |
* @since 1.8.12 |
| 478 |
* |
| 479 |
* @param string $key |
| 480 |
* |
| 481 |
* @return string|bool |
| 482 |
*/ |
| 483 |
function give_get_country_name_by_key( $key ) { |
| 484 |
$country_list = give_get_country_list(); |
| 485 |
|
| 486 |
if ( array_key_exists( $key, $country_list ) ) { |
| 487 |
return $country_list[ $key ]; |
| 488 |
} |
| 489 |
|
| 490 |
return false; |
| 491 |
} |
| 492 |
|
| 493 |
/** |
| 494 |
* Get the label that need to show as an placeholder. |
| 495 |
* |
| 496 |
* @ since 1.8.12 |
| 497 |
* |
| 498 |
* @return array $country_states_label |
| 499 |
*/ |
| 500 |
function give_get_states_label() { |
| 501 |
$country_states_label = []; |
| 502 |
$default_label = __( 'State', 'give' ); |
| 503 |
$locale = give_get_country_locale(); |
| 504 |
foreach ( $locale as $key => $value ) { |
| 505 |
$label = $default_label; |
| 506 |
if ( ! empty( $value['state'] ) && ! empty( $value['state']['label'] ) ) { |
| 507 |
$label = $value['state']['label']; |
| 508 |
} |
| 509 |
$country_states_label[ $key ] = $label; |
| 510 |
} |
| 511 |
|
| 512 |
/** |
| 513 |
* Filter can be used to add or remove the Country that does not have states init. |
| 514 |
* |
| 515 |
* @since 1.8.11 |
| 516 |
* |
| 517 |
* @param array $country Contain key as there country code & value as there country name. |
| 518 |
*/ |
| 519 |
return (array) apply_filters( 'give_get_states_label', $country_states_label ); |
| 520 |
} |
| 521 |
|
| 522 |
/** |
| 523 |
* Get country locale settings. |
| 524 |
* |
| 525 |
* @since 1.8.12 |
| 526 |
* |
| 527 |
* @return array |
| 528 |
*/ |
| 529 |
function give_get_country_locale() { |
| 530 |
return (array) apply_filters( |
| 531 |
'give_get_country_locale', |
| 532 |
[ |
| 533 |
'AE' => [ |
| 534 |
'state' => [ |
| 535 |
'required' => false, |
| 536 |
], |
| 537 |
], |
| 538 |
'AF' => [ |
| 539 |
'state' => [ |
| 540 |
'required' => false, |
| 541 |
'hidden' => true, |
| 542 |
], |
| 543 |
], |
| 544 |
'AT' => [ |
| 545 |
'state' => [ |
| 546 |
'required' => false, |
| 547 |
'hidden' => true, |
| 548 |
], |
| 549 |
], |
| 550 |
'AU' => [ |
| 551 |
'state' => [ |
| 552 |
'label' => __( 'State', 'give' ), |
| 553 |
], |
| 554 |
], |
| 555 |
'AX' => [ |
| 556 |
'state' => [ |
| 557 |
'required' => false, |
| 558 |
], |
| 559 |
], |
| 560 |
'BD' => [ |
| 561 |
'state' => [ |
| 562 |
'label' => __( 'District', 'give' ), |
| 563 |
], |
| 564 |
], |
| 565 |
'BE' => [ |
| 566 |
'state' => [ |
| 567 |
'required' => false, |
| 568 |
'label' => __( 'Province', 'give' ), |
| 569 |
'hidden' => true, |
| 570 |
], |
| 571 |
], |
| 572 |
'BI' => [ |
| 573 |
'state' => [ |
| 574 |
'required' => false, |
| 575 |
], |
| 576 |
], |
| 577 |
'CA' => [ |
| 578 |
'state' => [ |
| 579 |
'label' => __( 'Province', 'give' ), |
| 580 |
], |
| 581 |
], |
| 582 |
'CH' => [ |
| 583 |
'state' => [ |
| 584 |
'label' => __( 'Canton', 'give' ), |
| 585 |
'required' => false, |
| 586 |
'hidden' => true, |
| 587 |
], |
| 588 |
], |
| 589 |
'CL' => [ |
| 590 |
'state' => [ |
| 591 |
'label' => __( 'Region', 'give' ), |
| 592 |
], |
| 593 |
], |
| 594 |
'CN' => [ |
| 595 |
'state' => [ |
| 596 |
'label' => __( 'Province', 'give' ), |
| 597 |
], |
| 598 |
], |
| 599 |
'CZ' => [ |
| 600 |
'state' => [ |
| 601 |
'required' => false, |
| 602 |
'hidden' => true, |
| 603 |
], |
| 604 |
], |
| 605 |
'DE' => [ |
| 606 |
'state' => [ |
| 607 |
'required' => false, |
| 608 |
'hidden' => true, |
| 609 |
], |
| 610 |
], |
| 611 |
'DK' => [ |
| 612 |
'state' => [ |
| 613 |
'required' => false, |
| 614 |
'hidden' => true, |
| 615 |
], |
| 616 |
], |
| 617 |
'EE' => [ |
| 618 |
'state' => [ |
| 619 |
'required' => false, |
| 620 |
'hidden' => true, |
| 621 |
], |
| 622 |
], |
| 623 |
'FI' => [ |
| 624 |
'state' => [ |
| 625 |
'required' => false, |
| 626 |
'hidden' => true, |
| 627 |
], |
| 628 |
], |
| 629 |
'FR' => [ |
| 630 |
'state' => [ |
| 631 |
'required' => false, |
| 632 |
'hidden' => true, |
| 633 |
], |
| 634 |
], |
| 635 |
'GP' => [ |
| 636 |
'state' => [ |
| 637 |
'required' => false, |
| 638 |
], |
| 639 |
], |
| 640 |
'GF' => [ |
| 641 |
'state' => [ |
| 642 |
'required' => false, |
| 643 |
], |
| 644 |
], |
| 645 |
'HK' => [ |
| 646 |
'state' => [ |
| 647 |
'label' => __( 'Region', 'give' ), |
| 648 |
], |
| 649 |
], |
| 650 |
'HU' => [ |
| 651 |
'state' => [ |
| 652 |
'label' => __( 'County', 'give' ), |
| 653 |
], |
| 654 |
], |
| 655 |
'ID' => [ |
| 656 |
'state' => [ |
| 657 |
'label' => __( 'Province', 'give' ), |
| 658 |
], |
| 659 |
], |
| 660 |
'IE' => [ |
| 661 |
'state' => [ |
| 662 |
'label' => __( 'County', 'give' ), |
| 663 |
], |
| 664 |
], |
| 665 |
'IS' => [ |
| 666 |
'state' => [ |
| 667 |
'required' => false, |
| 668 |
'hidden' => true, |
| 669 |
], |
| 670 |
], |
| 671 |
'IL' => [ |
| 672 |
'state' => [ |
| 673 |
'required' => false, |
| 674 |
], |
| 675 |
], |
| 676 |
'IT' => [ |
| 677 |
'state' => [ |
| 678 |
'required' => true, |
| 679 |
'label' => __( 'Province', 'give' ), |
| 680 |
], |
| 681 |
], |
| 682 |
'JP' => [ |
| 683 |
'state' => [ |
| 684 |
'label' => __( 'Prefecture', 'give' ), |
| 685 |
], |
| 686 |
], |
| 687 |
'KR' => [ |
| 688 |
'state' => [ |
| 689 |
'required' => false, |
| 690 |
'hidden' => true, |
| 691 |
], |
| 692 |
], |
| 693 |
'KW' => [ |
| 694 |
'state' => [ |
| 695 |
'required' => false, |
| 696 |
], |
| 697 |
], |
| 698 |
'LB' => [ |
| 699 |
'state' => [ |
| 700 |
'required' => false, |
| 701 |
], |
| 702 |
], |
| 703 |
'MC' => [ |
| 704 |
'state' => [ |
| 705 |
'required' => false, |
| 706 |
'hidden' => true, |
| 707 |
], |
| 708 |
], |
| 709 |
'MQ' => [ |
| 710 |
'state' => [ |
| 711 |
'required' => false, |
| 712 |
], |
| 713 |
], |
| 714 |
'NL' => [ |
| 715 |
'state' => [ |
| 716 |
'required' => false, |
| 717 |
'label' => __( 'Province', 'give' ), |
| 718 |
'hidden' => true, |
| 719 |
], |
| 720 |
], |
| 721 |
'NZ' => [ |
| 722 |
'state' => [ |
| 723 |
'label' => __( 'Region', 'give' ), |
| 724 |
], |
| 725 |
], |
| 726 |
'NO' => [ |
| 727 |
'state' => [ |
| 728 |
'required' => false, |
| 729 |
'hidden' => true, |
| 730 |
], |
| 731 |
], |
| 732 |
'NP' => [ |
| 733 |
'state' => [ |
| 734 |
'label' => __( 'State / Zone', 'give' ), |
| 735 |
], |
| 736 |
], |
| 737 |
'PL' => [ |
| 738 |
'state' => [ |
| 739 |
'required' => false, |
| 740 |
'hidden' => true, |
| 741 |
], |
| 742 |
], |
| 743 |
'PT' => [ |
| 744 |
'state' => [ |
| 745 |
'required' => false, |
| 746 |
'hidden' => true, |
| 747 |
], |
| 748 |
], |
| 749 |
'RE' => [ |
| 750 |
'state' => [ |
| 751 |
'required' => false, |
| 752 |
], |
| 753 |
], |
| 754 |
'RO' => [ |
| 755 |
'state' => [ |
| 756 |
'required' => false, |
| 757 |
], |
| 758 |
], |
| 759 |
'SG' => [ |
| 760 |
'state' => [ |
| 761 |
'required' => false, |
| 762 |
], |
| 763 |
'city' => [ |
| 764 |
'required' => false, |
| 765 |
], |
| 766 |
], |
| 767 |
'SK' => [ |
| 768 |
'state' => [ |
| 769 |
'required' => false, |
| 770 |
'hidden' => true, |
| 771 |
], |
| 772 |
], |
| 773 |
'SI' => [ |
| 774 |
'state' => [ |
| 775 |
'required' => false, |
| 776 |
'hidden' => true, |
| 777 |
], |
| 778 |
], |
| 779 |
'ES' => [ |
| 780 |
'state' => [ |
| 781 |
'label' => __( 'Province', 'give' ), |
| 782 |
], |
| 783 |
], |
| 784 |
'LI' => [ |
| 785 |
'state' => [ |
| 786 |
'label' => __( 'Municipality', 'give' ), |
| 787 |
'required' => false, |
| 788 |
'hidden' => true, |
| 789 |
], |
| 790 |
], |
| 791 |
'LK' => [ |
| 792 |
'state' => [ |
| 793 |
'required' => false, |
| 794 |
], |
| 795 |
], |
| 796 |
'SE' => [ |
| 797 |
'state' => [ |
| 798 |
'required' => false, |
| 799 |
'hidden' => true, |
| 800 |
], |
| 801 |
], |
| 802 |
'TR' => [ |
| 803 |
'state' => [ |
| 804 |
'label' => __( 'Province', 'give' ), |
| 805 |
], |
| 806 |
], |
| 807 |
'US' => [ |
| 808 |
'state' => [ |
| 809 |
'label' => __( 'State', 'give' ), |
| 810 |
], |
| 811 |
], |
| 812 |
'GB' => [ |
| 813 |
'state' => [ |
| 814 |
'label' => __( 'County', 'give' ), |
| 815 |
'required' => false, |
| 816 |
], |
| 817 |
], |
| 818 |
'VN' => [ |
| 819 |
'state' => [ |
| 820 |
'required' => false, |
| 821 |
'hidden' => true, |
| 822 |
], |
| 823 |
], |
| 824 |
'YT' => [ |
| 825 |
'state' => [ |
| 826 |
'required' => false, |
| 827 |
], |
| 828 |
], |
| 829 |
'ZA' => [ |
| 830 |
'state' => [ |
| 831 |
'label' => __( 'Province', 'give' ), |
| 832 |
], |
| 833 |
], |
| 834 |
'PA' => [ |
| 835 |
'state' => [ |
| 836 |
'required' => true, |
| 837 |
], |
| 838 |
], |
| 839 |
] |
| 840 |
); |
| 841 |
} |
| 842 |
|
| 843 |
/** |
| 844 |
* Get Turkey States |
| 845 |
* |
| 846 |
* @since 1.8.12 |
| 847 |
* @return array $states A list of states |
| 848 |
*/ |
| 849 |
function give_get_turkey_states_list() { |
| 850 |
$states = [ |
| 851 |
'' => '', |
| 852 |
'TR01' => __( 'Adana', 'give' ), |
| 853 |
'TR02' => __( 'Adıyaman', 'give' ), |
| 854 |
'TR03' => __( 'Afyon', 'give' ), |
| 855 |
'TR04' => __( 'Ağrı', 'give' ), |
| 856 |
'TR05' => __( 'Amasya', 'give' ), |
| 857 |
'TR06' => __( 'Ankara', 'give' ), |
| 858 |
'TR07' => __( 'Antalya', 'give' ), |
| 859 |
'TR08' => __( 'Artvin', 'give' ), |
| 860 |
'TR09' => __( 'Aydın', 'give' ), |
| 861 |
'TR10' => __( 'Balıkesir', 'give' ), |
| 862 |
'TR11' => __( 'Bilecik', 'give' ), |
| 863 |
'TR12' => __( 'Bingöl', 'give' ), |
| 864 |
'TR13' => __( 'Bitlis', 'give' ), |
| 865 |
'TR14' => __( 'Bolu', 'give' ), |
| 866 |
'TR15' => __( 'Burdur', 'give' ), |
| 867 |
'TR16' => __( 'Bursa', 'give' ), |
| 868 |
'TR17' => __( 'Çanakkale', 'give' ), |
| 869 |
'TR18' => __( 'Çankırı', 'give' ), |
| 870 |
'TR19' => __( 'Çorum', 'give' ), |
| 871 |
'TR20' => __( 'Denizli', 'give' ), |
| 872 |
'TR21' => __( 'Diyarbakır', 'give' ), |
| 873 |
'TR22' => __( 'Edirne', 'give' ), |
| 874 |
'TR23' => __( 'Elazığ', 'give' ), |
| 875 |
'TR24' => __( 'Erzincan', 'give' ), |
| 876 |
'TR25' => __( 'Erzurum', 'give' ), |
| 877 |
'TR26' => __( 'Eskişehir', 'give' ), |
| 878 |
'TR27' => __( 'Gaziantep', 'give' ), |
| 879 |
'TR28' => __( 'Giresun', 'give' ), |
| 880 |
'TR29' => __( 'Gümüşhane', 'give' ), |
| 881 |
'TR30' => __( 'Hakkari', 'give' ), |
| 882 |
'TR31' => __( 'Hatay', 'give' ), |
| 883 |
'TR32' => __( 'Isparta', 'give' ), |
| 884 |
'TR33' => __( 'İçel', 'give' ), |
| 885 |
'TR34' => __( 'İstanbul', 'give' ), |
| 886 |
'TR35' => __( 'İzmir', 'give' ), |
| 887 |
'TR36' => __( 'Kars', 'give' ), |
| 888 |
'TR37' => __( 'Kastamonu', 'give' ), |
| 889 |
'TR38' => __( 'Kayseri', 'give' ), |
| 890 |
'TR39' => __( 'Kırklareli', 'give' ), |
| 891 |
'TR40' => __( 'Kırşehir', 'give' ), |
| 892 |
'TR41' => __( 'Kocaeli', 'give' ), |
| 893 |
'TR42' => __( 'Konya', 'give' ), |
| 894 |
'TR43' => __( 'Kütahya', 'give' ), |
| 895 |
'TR44' => __( 'Malatya', 'give' ), |
| 896 |
'TR45' => __( 'Manisa', 'give' ), |
| 897 |
'TR46' => __( 'Kahramanmaraş', 'give' ), |
| 898 |
'TR47' => __( 'Mardin', 'give' ), |
| 899 |
'TR48' => __( 'Muğla', 'give' ), |
| 900 |
'TR49' => __( 'Muş', 'give' ), |
| 901 |
'TR50' => __( 'Nevşehir', 'give' ), |
| 902 |
'TR51' => __( 'Niğde', 'give' ), |
| 903 |
'TR52' => __( 'Ordu', 'give' ), |
| 904 |
'TR53' => __( 'Rize', 'give' ), |
| 905 |
'TR54' => __( 'Sakarya', 'give' ), |
| 906 |
'TR55' => __( 'Samsun', 'give' ), |
| 907 |
'TR56' => __( 'Siirt', 'give' ), |
| 908 |
'TR57' => __( 'Sinop', 'give' ), |
| 909 |
'TR58' => __( 'Sivas', 'give' ), |
| 910 |
'TR59' => __( 'Tekirdağ', 'give' ), |
| 911 |
'TR60' => __( 'Tokat', 'give' ), |
| 912 |
'TR61' => __( 'Trabzon', 'give' ), |
| 913 |
'TR62' => __( 'Tunceli', 'give' ), |
| 914 |
'TR63' => __( 'Şanlıurfa', 'give' ), |
| 915 |
'TR64' => __( 'Uşak', 'give' ), |
| 916 |
'TR65' => __( 'Van', 'give' ), |
| 917 |
'TR66' => __( 'Yozgat', 'give' ), |
| 918 |
'TR67' => __( 'Zonguldak', 'give' ), |
| 919 |
'TR68' => __( 'Aksaray', 'give' ), |
| 920 |
'TR69' => __( 'Bayburt', 'give' ), |
| 921 |
'TR70' => __( 'Karaman', 'give' ), |
| 922 |
'TR71' => __( 'Kırıkkale', 'give' ), |
| 923 |
'TR72' => __( 'Batman', 'give' ), |
| 924 |
'TR73' => __( 'Şırnak', 'give' ), |
| 925 |
'TR74' => __( 'Bartın', 'give' ), |
| 926 |
'TR75' => __( 'Ardahan', 'give' ), |
| 927 |
'TR76' => __( 'Iğdır', 'give' ), |
| 928 |
'TR77' => __( 'Yalova', 'give' ), |
| 929 |
'TR78' => __( 'Karabük', 'give' ), |
| 930 |
'TR79' => __( 'Kilis', 'give' ), |
| 931 |
'TR80' => __( 'Osmaniye', 'give' ), |
| 932 |
'TR81' => __( 'Düzce', 'give' ), |
| 933 |
]; |
| 934 |
|
| 935 |
return apply_filters( 'give_turkey_states', $states ); |
| 936 |
} |
| 937 |
|
| 938 |
/** |
| 939 |
* Get Romania States |
| 940 |
* |
| 941 |
* @since 1.8.12 |
| 942 |
* @return array $states A list of states |
| 943 |
*/ |
| 944 |
function give_get_romania_states_list() { |
| 945 |
$states = [ |
| 946 |
'' => '', |
| 947 |
'AB' => __( 'Alba', 'give' ), |
| 948 |
'AR' => __( 'Arad', 'give' ), |
| 949 |
'AG' => __( 'Arges', 'give' ), |
| 950 |
'BC' => __( 'Bacau', 'give' ), |
| 951 |
'BH' => __( 'Bihor', 'give' ), |
| 952 |
'BN' => __( 'Bistrita-Nasaud', 'give' ), |
| 953 |
'BT' => __( 'Botosani', 'give' ), |
| 954 |
'BR' => __( 'Braila', 'give' ), |
| 955 |
'BV' => __( 'Brasov', 'give' ), |
| 956 |
'B' => __( 'Bucuresti', 'give' ), |
| 957 |
'BZ' => __( 'Buzau', 'give' ), |
| 958 |
'CL' => __( 'Calarasi', 'give' ), |
| 959 |
'CS' => __( 'Caras-Severin', 'give' ), |
| 960 |
'CJ' => __( 'Cluj', 'give' ), |
| 961 |
'CT' => __( 'Constanta', 'give' ), |
| 962 |
'CV' => __( 'Covasna', 'give' ), |
| 963 |
'DB' => __( 'Dambovita', 'give' ), |
| 964 |
'DJ' => __( 'Dolj', 'give' ), |
| 965 |
'GL' => __( 'Galati', 'give' ), |
| 966 |
'GR' => __( 'Giurgiu', 'give' ), |
| 967 |
'GJ' => __( 'Gorj', 'give' ), |
| 968 |
'HR' => __( 'Harghita', 'give' ), |
| 969 |
'HD' => __( 'Hunedoara', 'give' ), |
| 970 |
'IL' => __( 'Ialomita', 'give' ), |
| 971 |
'IS' => __( 'Iasi', 'give' ), |
| 972 |
'IF' => __( 'Ilfov', 'give' ), |
| 973 |
'MM' => __( 'Maramures', 'give' ), |
| 974 |
'MH' => __( 'Mehedinti', 'give' ), |
| 975 |
'MS' => __( 'Mures', 'give' ), |
| 976 |
'NT' => __( 'Neamt', 'give' ), |
| 977 |
'OT' => __( 'Olt', 'give' ), |
| 978 |
'PH' => __( 'Prahova', 'give' ), |
| 979 |
'SJ' => __( 'Salaj', 'give' ), |
| 980 |
'SM' => __( 'Satu Mare', 'give' ), |
| 981 |
'SB' => __( 'Sibiu', 'give' ), |
| 982 |
'SV' => __( 'Suceava', 'give' ), |
| 983 |
'TR' => __( 'Teleorman', 'give' ), |
| 984 |
'TM' => __( 'Timis', 'give' ), |
| 985 |
'TL' => __( 'Tulcea', 'give' ), |
| 986 |
'VL' => __( 'Valcea', 'give' ), |
| 987 |
'VS' => __( 'Vaslui', 'give' ), |
| 988 |
'VN' => __( 'Vrancea', 'give' ), |
| 989 |
]; |
| 990 |
|
| 991 |
return apply_filters( 'give_romania_states', $states ); |
| 992 |
} |
| 993 |
|
| 994 |
/** |
| 995 |
* Get Pakistan States |
| 996 |
* |
| 997 |
* @since 1.8.12 |
| 998 |
* @return array $states A list of states |
| 999 |
*/ |
| 1000 |
function give_get_pakistan_states_list() { |
| 1001 |
$states = [ |
| 1002 |
'' => '', |
| 1003 |
'JK' => __( 'Azad Kashmir', 'give' ), |
| 1004 |
'BA' => __( 'Balochistan', 'give' ), |
| 1005 |
'TA' => __( 'FATA', 'give' ), |
| 1006 |
'GB' => __( 'Gilgit Baltistan', 'give' ), |
| 1007 |
'IS' => __( 'Islamabad Capital Territory', 'give' ), |
| 1008 |
'KP' => __( 'Khyber Pakhtunkhwa', 'give' ), |
| 1009 |
'PB' => __( 'Punjab', 'give' ), |
| 1010 |
'SD' => __( 'Sindh', 'give' ), |
| 1011 |
]; |
| 1012 |
|
| 1013 |
return apply_filters( 'give_pakistan_states', $states ); |
| 1014 |
} |
| 1015 |
|
| 1016 |
/** |
| 1017 |
* Get Philippines States |
| 1018 |
* |
| 1019 |
* @since 1.8.12 |
| 1020 |
* @return array $states A list of states |
| 1021 |
*/ |
| 1022 |
function give_get_philippines_states_list() { |
| 1023 |
$states = [ |
| 1024 |
'' => '', |
| 1025 |
'ABR' => __( 'Abra', 'give' ), |
| 1026 |
'AGN' => __( 'Agusan del Norte', 'give' ), |
| 1027 |
'AGS' => __( 'Agusan del Sur', 'give' ), |
| 1028 |
'AKL' => __( 'Aklan', 'give' ), |
| 1029 |
'ALB' => __( 'Albay', 'give' ), |
| 1030 |
'ANT' => __( 'Antique', 'give' ), |
| 1031 |
'APA' => __( 'Apayao', 'give' ), |
| 1032 |
'AUR' => __( 'Aurora', 'give' ), |
| 1033 |
'BAS' => __( 'Basilan', 'give' ), |
| 1034 |
'BAN' => __( 'Bataan', 'give' ), |
| 1035 |
'BTN' => __( 'Batanes', 'give' ), |
| 1036 |
'BTG' => __( 'Batangas', 'give' ), |
| 1037 |
'BEN' => __( 'Benguet', 'give' ), |
| 1038 |
'BIL' => __( 'Biliran', 'give' ), |
| 1039 |
'BOH' => __( 'Bohol', 'give' ), |
| 1040 |
'BUK' => __( 'Bukidnon', 'give' ), |
| 1041 |
'BUL' => __( 'Bulacan', 'give' ), |
| 1042 |
'CAG' => __( 'Cagayan', 'give' ), |
| 1043 |
'CAN' => __( 'Camarines Norte', 'give' ), |
| 1044 |
'CAS' => __( 'Camarines Sur', 'give' ), |
| 1045 |
'CAM' => __( 'Camiguin', 'give' ), |
| 1046 |
'CAP' => __( 'Capiz', 'give' ), |
| 1047 |
'CAT' => __( 'Catanduanes', 'give' ), |
| 1048 |
'CAV' => __( 'Cavite', 'give' ), |
| 1049 |
'CEB' => __( 'Cebu', 'give' ), |
| 1050 |
'COM' => __( 'Compostela Valley', 'give' ), |
| 1051 |
'NCO' => __( 'Cotabato', 'give' ), |
| 1052 |
'DAV' => __( 'Davao del Norte', 'give' ), |
| 1053 |
'DAS' => __( 'Davao del Sur', 'give' ), |
| 1054 |
'DAC' => __( 'Davao Occidental', 'give' ), // TODO: Needs to be updated when ISO code is assigned |
| 1055 |
'DAO' => __( 'Davao Oriental', 'give' ), |
| 1056 |
'DIN' => __( 'Dinagat Islands', 'give' ), |
| 1057 |
'EAS' => __( 'Eastern Samar', 'give' ), |
| 1058 |
'GUI' => __( 'Guimaras', 'give' ), |
| 1059 |
'IFU' => __( 'Ifugao', 'give' ), |
| 1060 |
'ILN' => __( 'Ilocos Norte', 'give' ), |
| 1061 |
'ILS' => __( 'Ilocos Sur', 'give' ), |
| 1062 |
'ILI' => __( 'Iloilo', 'give' ), |
| 1063 |
'ISA' => __( 'Isabela', 'give' ), |
| 1064 |
'KAL' => __( 'Kalinga', 'give' ), |
| 1065 |
'LUN' => __( 'La Union', 'give' ), |
| 1066 |
'LAG' => __( 'Laguna', 'give' ), |
| 1067 |
'LAN' => __( 'Lanao del Norte', 'give' ), |
| 1068 |
'LAS' => __( 'Lanao del Sur', 'give' ), |
| 1069 |
'LEY' => __( 'Leyte', 'give' ), |
| 1070 |
'MAG' => __( 'Maguindanao', 'give' ), |
| 1071 |
'MAD' => __( 'Marinduque', 'give' ), |
| 1072 |
'MAS' => __( 'Masbate', 'give' ), |
| 1073 |
'MSC' => __( 'Misamis Occidental', 'give' ), |
| 1074 |
'MSR' => __( 'Misamis Oriental', 'give' ), |
| 1075 |
'MOU' => __( 'Mountain Province', 'give' ), |
| 1076 |
'NEC' => __( 'Negros Occidental', 'give' ), |
| 1077 |
'NER' => __( 'Negros Oriental', 'give' ), |
| 1078 |
'NSA' => __( 'Northern Samar', 'give' ), |
| 1079 |
'NUE' => __( 'Nueva Ecija', 'give' ), |
| 1080 |
'NUV' => __( 'Nueva Vizcaya', 'give' ), |
| 1081 |
'MDC' => __( 'Occidental Mindoro', 'give' ), |
| 1082 |
'MDR' => __( 'Oriental Mindoro', 'give' ), |
| 1083 |
'PLW' => __( 'Palawan', 'give' ), |
| 1084 |
'PAM' => __( 'Pampanga', 'give' ), |
| 1085 |
'PAN' => __( 'Pangasinan', 'give' ), |
| 1086 |
'QUE' => __( 'Quezon', 'give' ), |
| 1087 |
'QUI' => __( 'Quirino', 'give' ), |
| 1088 |
'RIZ' => __( 'Rizal', 'give' ), |
| 1089 |
'ROM' => __( 'Romblon', 'give' ), |
| 1090 |
'WSA' => __( 'Samar', 'give' ), |
| 1091 |
'SAR' => __( 'Sarangani', 'give' ), |
| 1092 |
'SIQ' => __( 'Siquijor', 'give' ), |
| 1093 |
'SOR' => __( 'Sorsogon', 'give' ), |
| 1094 |
'SCO' => __( 'South Cotabato', 'give' ), |
| 1095 |
'SLE' => __( 'Southern Leyte', 'give' ), |
| 1096 |
'SUK' => __( 'Sultan Kudarat', 'give' ), |
| 1097 |
'SLU' => __( 'Sulu', 'give' ), |
| 1098 |
'SUN' => __( 'Surigao del Norte', 'give' ), |
| 1099 |
'SUR' => __( 'Surigao del Sur', 'give' ), |
| 1100 |
'TAR' => __( 'Tarlac', 'give' ), |
| 1101 |
'TAW' => __( 'Tawi-Tawi', 'give' ), |
| 1102 |
'ZMB' => __( 'Zambales', 'give' ), |
| 1103 |
'ZAN' => __( 'Zamboanga del Norte', 'give' ), |
| 1104 |
'ZAS' => __( 'Zamboanga del Sur', 'give' ), |
| 1105 |
'ZSI' => __( 'Zamboanga Sibugay', 'give' ), |
| 1106 |
'00' => __( 'Metro Manila', 'give' ), |
| 1107 |
]; |
| 1108 |
|
| 1109 |
return apply_filters( 'give_philippines_states', $states ); |
| 1110 |
} |
| 1111 |
|
| 1112 |
/** |
| 1113 |
* Get Peru States |
| 1114 |
* |
| 1115 |
* @since 1.8.12 |
| 1116 |
* @return array $states A list of states |
| 1117 |
*/ |
| 1118 |
function give_get_peru_states_list() { |
| 1119 |
$states = [ |
| 1120 |
'' => '', |
| 1121 |
'CAL' => __( 'El Callao', 'give' ), |
| 1122 |
'LMA' => __( 'Municipalidad Metropolitana de Lima', 'give' ), |
| 1123 |
'AMA' => __( 'Amazonas', 'give' ), |
| 1124 |
'ANC' => __( 'Ancash', 'give' ), |
| 1125 |
'APU' => __( 'Apurímac', 'give' ), |
| 1126 |
'ARE' => __( 'Arequipa', 'give' ), |
| 1127 |
'AYA' => __( 'Ayacucho', 'give' ), |
| 1128 |
'CAJ' => __( 'Cajamarca', 'give' ), |
| 1129 |
'CUS' => __( 'Cusco', 'give' ), |
| 1130 |
'HUV' => __( 'Huancavelica', 'give' ), |
| 1131 |
'HUC' => __( 'Huánuco', 'give' ), |
| 1132 |
'ICA' => __( 'Ica', 'give' ), |
| 1133 |
'JUN' => __( 'Junín', 'give' ), |
| 1134 |
'LAL' => __( 'La Libertad', 'give' ), |
| 1135 |
'LAM' => __( 'Lambayeque', 'give' ), |
| 1136 |
'LIM' => __( 'Lima', 'give' ), |
| 1137 |
'LOR' => __( 'Loreto', 'give' ), |
| 1138 |
'MDD' => __( 'Madre de Dios', 'give' ), |
| 1139 |
'MOQ' => __( 'Moquegua', 'give' ), |
| 1140 |
'PAS' => __( 'Pasco', 'give' ), |
| 1141 |
'PIU' => __( 'Piura', 'give' ), |
| 1142 |
'PUN' => __( 'Puno', 'give' ), |
| 1143 |
'SAM' => __( 'San Martín', 'give' ), |
| 1144 |
'TAC' => __( 'Tacna', 'give' ), |
| 1145 |
'TUM' => __( 'Tumbes', 'give' ), |
| 1146 |
'UCA' => __( 'Ucayali', 'give' ), |
| 1147 |
]; |
| 1148 |
|
| 1149 |
return apply_filters( 'give_peru_states', $states ); |
| 1150 |
} |
| 1151 |
|
| 1152 |
/** |
| 1153 |
* Get Nepal States |
| 1154 |
* |
| 1155 |
* @since 1.8.12 |
| 1156 |
* @return array $states A list of states |
| 1157 |
*/ |
| 1158 |
function give_get_nepal_states_list() { |
| 1159 |
$states = [ |
| 1160 |
'' => '', |
| 1161 |
'BAG' => __( 'Bagmati', 'give' ), |
| 1162 |
'BHE' => __( 'Bheri', 'give' ), |
| 1163 |
'DHA' => __( 'Dhaulagiri', 'give' ), |
| 1164 |
'GAN' => __( 'Gandaki', 'give' ), |
| 1165 |
'JAN' => __( 'Janakpur', 'give' ), |
| 1166 |
'KAR' => __( 'Karnali', 'give' ), |
| 1167 |
'KOS' => __( 'Koshi', 'give' ), |
| 1168 |
'LUM' => __( 'Lumbini', 'give' ), |
| 1169 |
'MAH' => __( 'Mahakali', 'give' ), |
| 1170 |
'MEC' => __( 'Mechi', 'give' ), |
| 1171 |
'NAR' => __( 'Narayani', 'give' ), |
| 1172 |
'RAP' => __( 'Rapti', 'give' ), |
| 1173 |
'SAG' => __( 'Sagarmatha', 'give' ), |
| 1174 |
'SET' => __( 'Seti', 'give' ), |
| 1175 |
]; |
| 1176 |
|
| 1177 |
return apply_filters( 'give_nepal_states', $states ); |
| 1178 |
} |
| 1179 |
|
| 1180 |
/** |
| 1181 |
* Get Nigerian States |
| 1182 |
* |
| 1183 |
* @since 1.8.12 |
| 1184 |
* @return array $states A list of states |
| 1185 |
*/ |
| 1186 |
function give_get_nigerian_states_list() { |
| 1187 |
$states = [ |
| 1188 |
'' => '', |
| 1189 |
'AB' => __( 'Abia', 'give' ), |
| 1190 |
'FC' => __( 'Abuja', 'give' ), |
| 1191 |
'AD' => __( 'Adamawa', 'give' ), |
| 1192 |
'AK' => __( 'Akwa Ibom', 'give' ), |
| 1193 |
'AN' => __( 'Anambra', 'give' ), |
| 1194 |
'BA' => __( 'Bauchi', 'give' ), |
| 1195 |
'BY' => __( 'Bayelsa', 'give' ), |
| 1196 |
'BE' => __( 'Benue', 'give' ), |
| 1197 |
'BO' => __( 'Borno', 'give' ), |
| 1198 |
'CR' => __( 'Cross River', 'give' ), |
| 1199 |
'DE' => __( 'Delta', 'give' ), |
| 1200 |
'EB' => __( 'Ebonyi', 'give' ), |
| 1201 |
'ED' => __( 'Edo', 'give' ), |
| 1202 |
'EK' => __( 'Ekiti', 'give' ), |
| 1203 |
'EN' => __( 'Enugu', 'give' ), |
| 1204 |
'GO' => __( 'Gombe', 'give' ), |
| 1205 |
'IM' => __( 'Imo', 'give' ), |
| 1206 |
'JI' => __( 'Jigawa', 'give' ), |
| 1207 |
'KD' => __( 'Kaduna', 'give' ), |
| 1208 |
'KN' => __( 'Kano', 'give' ), |
| 1209 |
'KT' => __( 'Katsina', 'give' ), |
| 1210 |
'KE' => __( 'Kebbi', 'give' ), |
| 1211 |
'KO' => __( 'Kogi', 'give' ), |
| 1212 |
'KW' => __( 'Kwara', 'give' ), |
| 1213 |
'LA' => __( 'Lagos', 'give' ), |
| 1214 |
'NA' => __( 'Nasarawa', 'give' ), |
| 1215 |
'NI' => __( 'Niger', 'give' ), |
| 1216 |
'OG' => __( 'Ogun', 'give' ), |
| 1217 |
'ON' => __( 'Ondo', 'give' ), |
| 1218 |
'OS' => __( 'Osun', 'give' ), |
| 1219 |
'OY' => __( 'Oyo', 'give' ), |
| 1220 |
'PL' => __( 'Plateau', 'give' ), |
| 1221 |
'RI' => __( 'Rivers', 'give' ), |
| 1222 |
'SO' => __( 'Sokoto', 'give' ), |
| 1223 |
'TA' => __( 'Taraba', 'give' ), |
| 1224 |
'YO' => __( 'Yobe', 'give' ), |
| 1225 |
'ZA' => __( 'Zamfara', 'give' ), |
| 1226 |
]; |
| 1227 |
|
| 1228 |
return apply_filters( 'give_nigerian_states', $states ); |
| 1229 |
} |
| 1230 |
|
| 1231 |
/** |
| 1232 |
* Get Mexico States |
| 1233 |
* |
| 1234 |
* @since 1.8.12 |
| 1235 |
* @return array $states A list of states |
| 1236 |
*/ |
| 1237 |
function give_get_mexico_states_list() { |
| 1238 |
$states = [ |
| 1239 |
'' => '', |
| 1240 |
'Distrito Federal' => __( 'Distrito Federal', 'give' ), |
| 1241 |
'Jalisco' => __( 'Jalisco', 'give' ), |
| 1242 |
'Nuevo Leon' => __( 'Nuevo León', 'give' ), |
| 1243 |
'Aguascalientes' => __( 'Aguascalientes', 'give' ), |
| 1244 |
'Baja California' => __( 'Baja California', 'give' ), |
| 1245 |
'Baja California Sur' => __( 'Baja California Sur', 'give' ), |
| 1246 |
'Campeche' => __( 'Campeche', 'give' ), |
| 1247 |
'Chiapas' => __( 'Chiapas', 'give' ), |
| 1248 |
'Chihuahua' => __( 'Chihuahua', 'give' ), |
| 1249 |
'Coahuila' => __( 'Coahuila', 'give' ), |
| 1250 |
'Colima' => __( 'Colima', 'give' ), |
| 1251 |
'Durango' => __( 'Durango', 'give' ), |
| 1252 |
'Guanajuato' => __( 'Guanajuato', 'give' ), |
| 1253 |
'Guerrero' => __( 'Guerrero', 'give' ), |
| 1254 |
'Hidalgo' => __( 'Hidalgo', 'give' ), |
| 1255 |
'Estado de Mexico' => __( 'Edo. de México', 'give' ), |
| 1256 |
'Michoacan' => __( 'Michoacán', 'give' ), |
| 1257 |
'Morelos' => __( 'Morelos', 'give' ), |
| 1258 |
'Nayarit' => __( 'Nayarit', 'give' ), |
| 1259 |
'Oaxaca' => __( 'Oaxaca', 'give' ), |
| 1260 |
'Puebla' => __( 'Puebla', 'give' ), |
| 1261 |
'Queretaro' => __( 'Querétaro', 'give' ), |
| 1262 |
'Quintana Roo' => __( 'Quintana Roo', 'give' ), |
| 1263 |
'San Luis Potosi' => __( 'San Luis Potosí', 'give' ), |
| 1264 |
'Sinaloa' => __( 'Sinaloa', 'give' ), |
| 1265 |
'Sonora' => __( 'Sonora', 'give' ), |
| 1266 |
'Tabasco' => __( 'Tabasco', 'give' ), |
| 1267 |
'Tamaulipas' => __( 'Tamaulipas', 'give' ), |
| 1268 |
'Tlaxcala' => __( 'Tlaxcala', 'give' ), |
| 1269 |
'Veracruz' => __( 'Veracruz', 'give' ), |
| 1270 |
'Yucatan' => __( 'Yucatán', 'give' ), |
| 1271 |
'Zacatecas' => __( 'Zacatecas', 'give' ), |
| 1272 |
]; |
| 1273 |
|
| 1274 |
return apply_filters( 'give_mexico_states', $states ); |
| 1275 |
} |
| 1276 |
|
| 1277 |
/** |
| 1278 |
* Get Japan States |
| 1279 |
* |
| 1280 |
* @since 1.8.12 |
| 1281 |
* @return array $states A list of states |
| 1282 |
*/ |
| 1283 |
function give_get_japan_states_list() { |
| 1284 |
$states = [ |
| 1285 |
'' => '', |
| 1286 |
'JP01' => __( 'Hokkaido', 'give' ), |
| 1287 |
'JP02' => __( 'Aomori', 'give' ), |
| 1288 |
'JP03' => __( 'Iwate', 'give' ), |
| 1289 |
'JP04' => __( 'Miyagi', 'give' ), |
| 1290 |
'JP05' => __( 'Akita', 'give' ), |
| 1291 |
'JP06' => __( 'Yamagata', 'give' ), |
| 1292 |
'JP07' => __( 'Fukushima', 'give' ), |
| 1293 |
'JP08' => __( 'Ibaraki', 'give' ), |
| 1294 |
'JP09' => __( 'Tochigi', 'give' ), |
| 1295 |
'JP10' => __( 'Gunma', 'give' ), |
| 1296 |
'JP11' => __( 'Saitama', 'give' ), |
| 1297 |
'JP12' => __( 'Chiba', 'give' ), |
| 1298 |
'JP13' => __( 'Tokyo', 'give' ), |
| 1299 |
'JP14' => __( 'Kanagawa', 'give' ), |
| 1300 |
'JP15' => __( 'Niigata', 'give' ), |
| 1301 |
'JP16' => __( 'Toyama', 'give' ), |
| 1302 |
'JP17' => __( 'Ishikawa', 'give' ), |
| 1303 |
'JP18' => __( 'Fukui', 'give' ), |
| 1304 |
'JP19' => __( 'Yamanashi', 'give' ), |
| 1305 |
'JP20' => __( 'Nagano', 'give' ), |
| 1306 |
'JP21' => __( 'Gifu', 'give' ), |
| 1307 |
'JP22' => __( 'Shizuoka', 'give' ), |
| 1308 |
'JP23' => __( 'Aichi', 'give' ), |
| 1309 |
'JP24' => __( 'Mie', 'give' ), |
| 1310 |
'JP25' => __( 'Shiga', 'give' ), |
| 1311 |
'JP26' => __( 'Kyoto', 'give' ), |
| 1312 |
'JP27' => __( 'Osaka', 'give' ), |
| 1313 |
'JP28' => __( 'Hyogo', 'give' ), |
| 1314 |
'JP29' => __( 'Nara', 'give' ), |
| 1315 |
'JP30' => __( 'Wakayama', 'give' ), |
| 1316 |
'JP31' => __( 'Tottori', 'give' ), |
| 1317 |
'JP32' => __( 'Shimane', 'give' ), |
| 1318 |
'JP33' => __( 'Okayama', 'give' ), |
| 1319 |
'JP34' => __( 'Hiroshima', 'give' ), |
| 1320 |
'JP35' => __( 'Yamaguchi', 'give' ), |
| 1321 |
'JP36' => __( 'Tokushima', 'give' ), |
| 1322 |
'JP37' => __( 'Kagawa', 'give' ), |
| 1323 |
'JP38' => __( 'Ehime', 'give' ), |
| 1324 |
'JP39' => __( 'Kochi', 'give' ), |
| 1325 |
'JP40' => __( 'Fukuoka', 'give' ), |
| 1326 |
'JP41' => __( 'Saga', 'give' ), |
| 1327 |
'JP42' => __( 'Nagasaki', 'give' ), |
| 1328 |
'JP43' => __( 'Kumamoto', 'give' ), |
| 1329 |
'JP44' => __( 'Oita', 'give' ), |
| 1330 |
'JP45' => __( 'Miyazaki', 'give' ), |
| 1331 |
'JP46' => __( 'Kagoshima', 'give' ), |
| 1332 |
'JP47' => __( 'Okinawa', 'give' ), |
| 1333 |
]; |
| 1334 |
|
| 1335 |
return apply_filters( 'give_japan_states', $states ); |
| 1336 |
} |
| 1337 |
|
| 1338 |
/** |
| 1339 |
* Get Italy States |
| 1340 |
* |
| 1341 |
* @since 1.8.12 |
| 1342 |
* @return array $states A list of states |
| 1343 |
*/ |
| 1344 |
function give_get_italy_states_list() { |
| 1345 |
$states = [ |
| 1346 |
'' => '', |
| 1347 |
'AG' => __( 'Agrigento', 'give' ), |
| 1348 |
'AL' => __( 'Alessandria', 'give' ), |
| 1349 |
'AN' => __( 'Ancona', 'give' ), |
| 1350 |
'AO' => __( 'Aosta', 'give' ), |
| 1351 |
'AR' => __( 'Arezzo', 'give' ), |
| 1352 |
'AP' => __( 'Ascoli Piceno', 'give' ), |
| 1353 |
'AT' => __( 'Asti', 'give' ), |
| 1354 |
'AV' => __( 'Avellino', 'give' ), |
| 1355 |
'BA' => __( 'Bari', 'give' ), |
| 1356 |
'BT' => __( 'Barletta-Andria-Trani', 'give' ), |
| 1357 |
'BL' => __( 'Belluno', 'give' ), |
| 1358 |
'BN' => __( 'Benevento', 'give' ), |
| 1359 |
'BG' => __( 'Bergamo', 'give' ), |
| 1360 |
'BI' => __( 'Biella', 'give' ), |
| 1361 |
'BO' => __( 'Bologna', 'give' ), |
| 1362 |
'BZ' => __( 'Bolzano', 'give' ), |
| 1363 |
'BS' => __( 'Brescia', 'give' ), |
| 1364 |
'BR' => __( 'Brindisi', 'give' ), |
| 1365 |
'CA' => __( 'Cagliari', 'give' ), |
| 1366 |
'CL' => __( 'Caltanissetta', 'give' ), |
| 1367 |
'CB' => __( 'Campobasso', 'give' ), |
| 1368 |
'CI' => __( 'Carbonia-Iglesias', 'give' ), |
| 1369 |
'CE' => __( 'Caserta', 'give' ), |
| 1370 |
'CT' => __( 'Catania', 'give' ), |
| 1371 |
'CZ' => __( 'Catanzaro', 'give' ), |
| 1372 |
'CH' => __( 'Chieti', 'give' ), |
| 1373 |
'CO' => __( 'Como', 'give' ), |
| 1374 |
'CS' => __( 'Cosenza', 'give' ), |
| 1375 |
'CR' => __( 'Cremona', 'give' ), |
| 1376 |
'KR' => __( 'Crotone', 'give' ), |
| 1377 |
'CN' => __( 'Cuneo', 'give' ), |
| 1378 |
'EN' => __( 'Enna', 'give' ), |
| 1379 |
'FM' => __( 'Fermo', 'give' ), |
| 1380 |
'FE' => __( 'Ferrara', 'give' ), |
| 1381 |
'FI' => __( 'Firenze', 'give' ), |
| 1382 |
'FG' => __( 'Foggia', 'give' ), |
| 1383 |
'FC' => __( 'Forlì-Cesena', 'give' ), |
| 1384 |
'FR' => __( 'Frosinone', 'give' ), |
| 1385 |
'GE' => __( 'Genova', 'give' ), |
| 1386 |
'GO' => __( 'Gorizia', 'give' ), |
| 1387 |
'GR' => __( 'Grosseto', 'give' ), |
| 1388 |
'IM' => __( 'Imperia', 'give' ), |
| 1389 |
'IS' => __( 'Isernia', 'give' ), |
| 1390 |
'SP' => __( 'La Spezia', 'give' ), |
| 1391 |
'AQ' => __( "L'Aquila", 'give' ), |
| 1392 |
'LT' => __( 'Latina', 'give' ), |
| 1393 |
'LE' => __( 'Lecce', 'give' ), |
| 1394 |
'LC' => __( 'Lecco', 'give' ), |
| 1395 |
'LI' => __( 'Livorno', 'give' ), |
| 1396 |
'LO' => __( 'Lodi', 'give' ), |
| 1397 |
'LU' => __( 'Lucca', 'give' ), |
| 1398 |
'MC' => __( 'Macerata', 'give' ), |
| 1399 |
'MN' => __( 'Mantova', 'give' ), |
| 1400 |
'MS' => __( 'Massa-Carrara', 'give' ), |
| 1401 |
'MT' => __( 'Matera', 'give' ), |
| 1402 |
'ME' => __( 'Messina', 'give' ), |
| 1403 |
'MI' => __( 'Milano', 'give' ), |
| 1404 |
'MO' => __( 'Modena', 'give' ), |
| 1405 |
'MB' => __( 'Monza e della Brianza', 'give' ), |
| 1406 |
'NA' => __( 'Napoli', 'give' ), |
| 1407 |
'NO' => __( 'Novara', 'give' ), |
| 1408 |
'NU' => __( 'Nuoro', 'give' ), |
| 1409 |
'OT' => __( 'Olbia-Tempio', 'give' ), |
| 1410 |
'OR' => __( 'Oristano', 'give' ), |
| 1411 |
'PD' => __( 'Padova', 'give' ), |
| 1412 |
'PA' => __( 'Palermo', 'give' ), |
| 1413 |
'PR' => __( 'Parma', 'give' ), |
| 1414 |
'PV' => __( 'Pavia', 'give' ), |
| 1415 |
'PG' => __( 'Perugia', 'give' ), |
| 1416 |
'PU' => __( 'Pesaro e Urbino', 'give' ), |
| 1417 |
'PE' => __( 'Pescara', 'give' ), |
| 1418 |
'PC' => __( 'Piacenza', 'give' ), |
| 1419 |
'PI' => __( 'Pisa', 'give' ), |
| 1420 |
'PT' => __( 'Pistoia', 'give' ), |
| 1421 |
'PN' => __( 'Pordenone', 'give' ), |
| 1422 |
'PZ' => __( 'Potenza', 'give' ), |
| 1423 |
'PO' => __( 'Prato', 'give' ), |
| 1424 |
'RG' => __( 'Ragusa', 'give' ), |
| 1425 |
'RA' => __( 'Ravenna', 'give' ), |
| 1426 |
'RC' => __( 'Reggio Calabria', 'give' ), |
| 1427 |
'RE' => __( 'Reggio Emilia', 'give' ), |
| 1428 |
'RI' => __( 'Rieti', 'give' ), |
| 1429 |
'RN' => __( 'Rimini', 'give' ), |
| 1430 |
'RM' => __( 'Roma', 'give' ), |
| 1431 |
'RO' => __( 'Rovigo', 'give' ), |
| 1432 |
'SA' => __( 'Salerno', 'give' ), |
| 1433 |
'VS' => __( 'Medio Campidano', 'give' ), |
| 1434 |
'SS' => __( 'Sassari', 'give' ), |
| 1435 |
'SV' => __( 'Savona', 'give' ), |
| 1436 |
'SI' => __( 'Siena', 'give' ), |
| 1437 |
'SR' => __( 'Siracusa', 'give' ), |
| 1438 |
'SO' => __( 'Sondrio', 'give' ), |
| 1439 |
'TA' => __( 'Taranto', 'give' ), |
| 1440 |
'TE' => __( 'Teramo', 'give' ), |
| 1441 |
'TR' => __( 'Terni', 'give' ), |
| 1442 |
'TO' => __( 'Torino', 'give' ), |
| 1443 |
'OG' => __( 'Ogliastra', 'give' ), |
| 1444 |
'TP' => __( 'Trapani', 'give' ), |
| 1445 |
'TN' => __( 'Trento', 'give' ), |
| 1446 |
'TV' => __( 'Treviso', 'give' ), |
| 1447 |
'TS' => __( 'Trieste', 'give' ), |
| 1448 |
'UD' => __( 'Udine', 'give' ), |
| 1449 |
'VA' => __( 'Varese', 'give' ), |
| 1450 |
'VE' => __( 'Venezia', 'give' ), |
| 1451 |
'VB' => __( 'Verbano-Cusio-Ossola', 'give' ), |
| 1452 |
'VC' => __( 'Vercelli', 'give' ), |
| 1453 |
'VR' => __( 'Verona', 'give' ), |
| 1454 |
'VV' => __( 'Vibo Valentia', 'give' ), |
| 1455 |
'VI' => __( 'Vicenza', 'give' ), |
| 1456 |
'VT' => __( 'Viterbo', 'give' ), |
| 1457 |
]; |
| 1458 |
|
| 1459 |
return apply_filters( 'give_italy_states', $states ); |
| 1460 |
} |
| 1461 |
|
| 1462 |
/** |
| 1463 |
* Get Iran States |
| 1464 |
* |
| 1465 |
* @since 1.8.12 |
| 1466 |
* @return array $states A list of states |
| 1467 |
*/ |
| 1468 |
function give_get_iran_states_list() { |
| 1469 |
$states = [ |
| 1470 |
'' => '', |
| 1471 |
'KHZ' => __( 'Khuzestan (خوزستان)', 'give' ), |
| 1472 |
'THR' => __( 'Tehran (تهران)', 'give' ), |
| 1473 |
'ILM' => __( 'Ilaam (ایلا� |
| 1474 |
)', 'give' ), |
| 1475 |
'BHR' => __( 'Bushehr (بوشهر)', 'give' ), |
| 1476 |
'ADL' => __( 'Ardabil (اردبیل)', 'give' ), |
| 1477 |
'ESF' => __( 'Isfahan (اصفهان)', 'give' ), |
| 1478 |
'YZD' => __( 'Yazd (یزد)', 'give' ), |
| 1479 |
'KRH' => __( 'Kermanshah (کر� |
| 1480 |
انشاه)', 'give' ), |
| 1481 |
'KRN' => __( 'Kerman (کر� |
| 1482 |
ان)', 'give' ), |
| 1483 |
'HDN' => __( 'Hamadan (ه� |
| 1484 |
دان)', 'give' ), |
| 1485 |
'GZN' => __( 'Ghazvin (قزوین)', 'give' ), |
| 1486 |
'ZJN' => __( 'Zanjan (زنجان)', 'give' ), |
| 1487 |
'LRS' => __( 'Luristan (لرستان)', 'give' ), |
| 1488 |
'ABZ' => __( 'Alborz (البرز)', 'give' ), |
| 1489 |
'EAZ' => __( 'East Azarbaijan (آذربایجان شرقی)', 'give' ), |
| 1490 |
'WAZ' => __( 'West Azarbaijan (آذربایجان غربی)', 'give' ), |
| 1491 |
'CHB' => __( 'Chaharmahal and Bakhtiari (چهار� |
| 1492 |
حال و بختیاری)', 'give' ), |
| 1493 |
'SKH' => __( 'South Khorasan (خراسان جنوبی)', 'give' ), |
| 1494 |
'RKH' => __( 'Razavi Khorasan (خراسان رضوی)', 'give' ), |
| 1495 |
'NKH' => __( 'North Khorasan (خراسان جنوبی)', 'give' ), |
| 1496 |
'SMN' => __( 'Semnan (س� |
| 1497 |
نان)', 'give' ), |
| 1498 |
'FRS' => __( 'Fars (فارس)', 'give' ), |
| 1499 |
'QHM' => __( 'Qom (ق� |
| 1500 |
)', 'give' ), |
| 1501 |
'KRD' => __( 'Kurdistan / کردستان)', 'give' ), |
| 1502 |
'KBD' => __( 'Kohgiluyeh and BoyerAhmad (کهگیلوییه و بویراح� |
| 1503 |
د)', 'give' ), |
| 1504 |
'GLS' => __( 'Golestan (گلستان)', 'give' ), |
| 1505 |
'GIL' => __( 'Gilan (گیلان)', 'give' ), |
| 1506 |
'MZN' => __( 'Mazandaran (� |
| 1507 |
ازندران)', 'give' ), |
| 1508 |
'MKZ' => __( 'Markazi (� |
| 1509 |
رکزی)', 'give' ), |
| 1510 |
'HRZ' => __( 'Hormozgan (هر� |
| 1511 |
زگان)', 'give' ), |
| 1512 |
'SBN' => __( 'Sistan and Baluchestan (سیستان و بلوچستان)', 'give' ), |
| 1513 |
]; |
| 1514 |
|
| 1515 |
return apply_filters( 'give_iran_states', $states ); |
| 1516 |
} |
| 1517 |
|
| 1518 |
/** |
| 1519 |
* Get Ireland States |
| 1520 |
* |
| 1521 |
* @since 1.8.12 |
| 1522 |
* @return array $states A list of states |
| 1523 |
*/ |
| 1524 |
function give_get_ireland_states_list() { |
| 1525 |
$states = [ |
| 1526 |
'' => '', |
| 1527 |
'AN' => __( 'Antrim', 'give' ), |
| 1528 |
'AR' => __( 'Armagh', 'give' ), |
| 1529 |
'CE' => __( 'Clare', 'give' ), |
| 1530 |
'CK' => __( 'Cork', 'give' ), |
| 1531 |
'CN' => __( 'Cavan', 'give' ), |
| 1532 |
'CW' => __( 'Carlow', 'give' ), |
| 1533 |
'DL' => __( 'Donegal', 'give' ), |
| 1534 |
'DN' => __( 'Dublin', 'give' ), |
| 1535 |
'DO' => __( 'Down', 'give' ), |
| 1536 |
'DY' => __( 'Derry', 'give' ), |
| 1537 |
'FM' => __( 'Fermanagh', 'give' ), |
| 1538 |
'GY' => __( 'Galway', 'give' ), |
| 1539 |
'KE' => __( 'Kildare', 'give' ), |
| 1540 |
'KK' => __( 'Kilkenny', 'give' ), |
| 1541 |
'KY' => __( 'Kerry', 'give' ), |
| 1542 |
'LD' => __( 'Longford', 'give' ), |
| 1543 |
'LH' => __( 'Louth', 'give' ), |
| 1544 |
'LK' => __( 'Limerick', 'give' ), |
| 1545 |
'LM' => __( 'Leitrim', 'give' ), |
| 1546 |
'LS' => __( 'Laois', 'give' ), |
| 1547 |
'MH' => __( 'Meath', 'give' ), |
| 1548 |
'MN' => __( 'Monaghan', 'give' ), |
| 1549 |
'MO' => __( 'Mayo', 'give' ), |
| 1550 |
'OY' => __( 'Offaly', 'give' ), |
| 1551 |
'RN' => __( 'Roscommon', 'give' ), |
| 1552 |
'SO' => __( 'Sligo', 'give' ), |
| 1553 |
'TR' => __( 'Tyrone', 'give' ), |
| 1554 |
'TY' => __( 'Tipperary', 'give' ), |
| 1555 |
'WD' => __( 'Waterford', 'give' ), |
| 1556 |
'WH' => __( 'Westmeath', 'give' ), |
| 1557 |
'WW' => __( 'Wicklow', 'give' ), |
| 1558 |
'WX' => __( 'Wexford', 'give' ), |
| 1559 |
]; |
| 1560 |
|
| 1561 |
return apply_filters( 'give_ireland_states', $states ); |
| 1562 |
} |
| 1563 |
|
| 1564 |
/** |
| 1565 |
* Get Greek States |
| 1566 |
* |
| 1567 |
* @since 1.8.12 |
| 1568 |
* @return array $states A list of states |
| 1569 |
*/ |
| 1570 |
function give_get_greek_states_list() { |
| 1571 |
$states = [ |
| 1572 |
'' => '', |
| 1573 |
'I' => __( 'Αττική', 'give' ), |
| 1574 |
'A' => __( 'Ανατολική Μακεδονία και Θράκη', 'give' ), |
| 1575 |
'B' => __( 'Κεντρική Μακεδονία', 'give' ), |
| 1576 |
'C' => __( 'Δ� |
| 1577 |
τική Μακεδονία', 'give' ), |
| 1578 |
'D' => __( 'Ήπειρος', 'give' ), |
| 1579 |
'E' => __( 'Θεσσαλία', 'give' ), |
| 1580 |
'F' => __( 'Ιόνιοι Νήσοι', 'give' ), |
| 1581 |
'G' => __( 'Δ� |
| 1582 |
τική Ελλάδα', 'give' ), |
| 1583 |
'H' => __( 'Στερεά Ελλάδα', 'give' ), |
| 1584 |
'J' => __( 'Πελοπόννησος', 'give' ), |
| 1585 |
'K' => __( 'Βόρειο Αιγαίο', 'give' ), |
| 1586 |
'L' => __( 'Νότιο Αιγαίο', 'give' ), |
| 1587 |
'M' => __( 'Κρήτη', 'give' ), |
| 1588 |
]; |
| 1589 |
|
| 1590 |
return apply_filters( 'give_greek_states', $states ); |
| 1591 |
} |
| 1592 |
|
| 1593 |
/** |
| 1594 |
* Get bolivian States |
| 1595 |
* |
| 1596 |
* @since 1.8.12 |
| 1597 |
* @return array $states A list of states |
| 1598 |
*/ |
| 1599 |
function give_get_bolivian_states_list() { |
| 1600 |
$states = [ |
| 1601 |
'' => '', |
| 1602 |
'B' => __( 'Chuquisaca', 'give' ), |
| 1603 |
'H' => __( 'Beni', 'give' ), |
| 1604 |
'C' => __( 'Cochabamba', 'give' ), |
| 1605 |
'L' => __( 'La Paz', 'give' ), |
| 1606 |
'O' => __( 'Oruro', 'give' ), |
| 1607 |
'N' => __( 'Pando', 'give' ), |
| 1608 |
'P' => __( 'Potosí', 'give' ), |
| 1609 |
'S' => __( 'Santa Cruz', 'give' ), |
| 1610 |
'T' => __( 'Tarija', 'give' ), |
| 1611 |
]; |
| 1612 |
|
| 1613 |
return apply_filters( 'give_bolivian_states', $states ); |
| 1614 |
} |
| 1615 |
|
| 1616 |
/** |
| 1617 |
* Get Bulgarian States |
| 1618 |
* |
| 1619 |
* @since 1.8.12 |
| 1620 |
* @return array $states A list of states |
| 1621 |
*/ |
| 1622 |
function give_get_bulgarian_states_list() { |
| 1623 |
$states = [ |
| 1624 |
'' => '', |
| 1625 |
'BG-01' => __( 'Blagoevgrad', 'give' ), |
| 1626 |
'BG-02' => __( 'Burgas', 'give' ), |
| 1627 |
'BG-08' => __( 'Dobrich', 'give' ), |
| 1628 |
'BG-07' => __( 'Gabrovo', 'give' ), |
| 1629 |
'BG-26' => __( 'Haskovo', 'give' ), |
| 1630 |
'BG-09' => __( 'Kardzhali', 'give' ), |
| 1631 |
'BG-10' => __( 'Kyustendil', 'give' ), |
| 1632 |
'BG-11' => __( 'Lovech', 'give' ), |
| 1633 |
'BG-12' => __( 'Montana', 'give' ), |
| 1634 |
'BG-13' => __( 'Pazardzhik', 'give' ), |
| 1635 |
'BG-14' => __( 'Pernik', 'give' ), |
| 1636 |
'BG-15' => __( 'Pleven', 'give' ), |
| 1637 |
'BG-16' => __( 'Plovdiv', 'give' ), |
| 1638 |
'BG-17' => __( 'Razgrad', 'give' ), |
| 1639 |
'BG-18' => __( 'Ruse', 'give' ), |
| 1640 |
'BG-27' => __( 'Shumen', 'give' ), |
| 1641 |
'BG-19' => __( 'Silistra', 'give' ), |
| 1642 |
'BG-20' => __( 'Sliven', 'give' ), |
| 1643 |
'BG-21' => __( 'Smolyan', 'give' ), |
| 1644 |
'BG-23' => __( 'Sofia', 'give' ), |
| 1645 |
'BG-22' => __( 'Sofia-Grad', 'give' ), |
| 1646 |
'BG-24' => __( 'Stara Zagora', 'give' ), |
| 1647 |
'BG-25' => __( 'Targovishte', 'give' ), |
| 1648 |
'BG-03' => __( 'Varna', 'give' ), |
| 1649 |
'BG-04' => __( 'Veliko Tarnovo', 'give' ), |
| 1650 |
'BG-05' => __( 'Vidin', 'give' ), |
| 1651 |
'BG-06' => __( 'Vratsa', 'give' ), |
| 1652 |
'BG-28' => __( 'Yambol', 'give' ), |
| 1653 |
]; |
| 1654 |
|
| 1655 |
return apply_filters( 'give_bulgarian_states', $states ); |
| 1656 |
} |
| 1657 |
|
| 1658 |
/** |
| 1659 |
* Get Bangladeshi States |
| 1660 |
* |
| 1661 |
* @since 1.8.12. |
| 1662 |
* @return array $states A list of states |
| 1663 |
*/ |
| 1664 |
function give_get_bangladeshi_states_list() { |
| 1665 |
$states = [ |
| 1666 |
'' => '', |
| 1667 |
'BAG' => __( 'Bagerhat', 'give' ), |
| 1668 |
'BAN' => __( 'Bandarban', 'give' ), |
| 1669 |
'BAR' => __( 'Barguna', 'give' ), |
| 1670 |
'BARI' => __( 'Barisal', 'give' ), |
| 1671 |
'BHO' => __( 'Bhola', 'give' ), |
| 1672 |
'BOG' => __( 'Bogra', 'give' ), |
| 1673 |
'BRA' => __( 'Brahmanbaria', 'give' ), |
| 1674 |
'CHA' => __( 'Chandpur', 'give' ), |
| 1675 |
'CHI' => __( 'Chittagong', 'give' ), |
| 1676 |
'CHU' => __( 'Chuadanga', 'give' ), |
| 1677 |
'COM' => __( 'Comilla', 'give' ), |
| 1678 |
'COX' => __( "Cox's Bazar", 'give' ), |
| 1679 |
'DHA' => __( 'Dhaka', 'give' ), |
| 1680 |
'DIN' => __( 'Dinajpur', 'give' ), |
| 1681 |
'FAR' => __( 'Faridpur ', 'give' ), |
| 1682 |
'FEN' => __( 'Feni', 'give' ), |
| 1683 |
'GAI' => __( 'Gaibandha', 'give' ), |
| 1684 |
'GAZI' => __( 'Gazipur', 'give' ), |
| 1685 |
'GOP' => __( 'Gopalganj', 'give' ), |
| 1686 |
'HAB' => __( 'Habiganj', 'give' ), |
| 1687 |
'JAM' => __( 'Jamalpur', 'give' ), |
| 1688 |
'JES' => __( 'Jessore', 'give' ), |
| 1689 |
'JHA' => __( 'Jhalokati', 'give' ), |
| 1690 |
'JHE' => __( 'Jhenaidah', 'give' ), |
| 1691 |
'JOY' => __( 'Joypurhat', 'give' ), |
| 1692 |
'KHA' => __( 'Khagrachhari', 'give' ), |
| 1693 |
'KHU' => __( 'Khulna', 'give' ), |
| 1694 |
'KIS' => __( 'Kishoreganj', 'give' ), |
| 1695 |
'KUR' => __( 'Kurigram', 'give' ), |
| 1696 |
'KUS' => __( 'Kushtia', 'give' ), |
| 1697 |
'LAK' => __( 'Lakshmipur', 'give' ), |
| 1698 |
'LAL' => __( 'Lalmonirhat', 'give' ), |
| 1699 |
'MAD' => __( 'Madaripur', 'give' ), |
| 1700 |
'MAG' => __( 'Magura', 'give' ), |
| 1701 |
'MAN' => __( 'Manikganj ', 'give' ), |
| 1702 |
'MEH' => __( 'Meherpur', 'give' ), |
| 1703 |
'MOU' => __( 'Moulvibazar', 'give' ), |
| 1704 |
'MUN' => __( 'Munshiganj', 'give' ), |
| 1705 |
'MYM' => __( 'Mymensingh', 'give' ), |
| 1706 |
'NAO' => __( 'Naogaon', 'give' ), |
| 1707 |
'NAR' => __( 'Narail', 'give' ), |
| 1708 |
'NARG' => __( 'Narayanganj', 'give' ), |
| 1709 |
'NARD' => __( 'Narsingdi', 'give' ), |
| 1710 |
'NAT' => __( 'Natore', 'give' ), |
| 1711 |
'NAW' => __( 'Nawabganj', 'give' ), |
| 1712 |
'NET' => __( 'Netrakona', 'give' ), |
| 1713 |
'NIL' => __( 'Nilphamari', 'give' ), |
| 1714 |
'NOA' => __( 'Noakhali', 'give' ), |
| 1715 |
'PAB' => __( 'Pabna', 'give' ), |
| 1716 |
'PAN' => __( 'Panchagarh', 'give' ), |
| 1717 |
'PAT' => __( 'Patuakhali', 'give' ), |
| 1718 |
'PIR' => __( 'Pirojpur', 'give' ), |
| 1719 |
'RAJB' => __( 'Rajbari', 'give' ), |
| 1720 |
'RAJ' => __( 'Rajshahi', 'give' ), |
| 1721 |
'RAN' => __( 'Rangamati', 'give' ), |
| 1722 |
'RANP' => __( 'Rangpur', 'give' ), |
| 1723 |
'SAT' => __( 'Satkhira', 'give' ), |
| 1724 |
'SHA' => __( 'Shariatpur', 'give' ), |
| 1725 |
'SHE' => __( 'Sherpur', 'give' ), |
| 1726 |
'SIR' => __( 'Sirajganj', 'give' ), |
| 1727 |
'SUN' => __( 'Sunamganj', 'give' ), |
| 1728 |
'SYL' => __( 'Sylhet', 'give' ), |
| 1729 |
'TAN' => __( 'Tangail', 'give' ), |
| 1730 |
'THA' => __( 'Thakurgaon', 'give' ), |
| 1731 |
]; |
| 1732 |
|
| 1733 |
return apply_filters( 'give_bangladeshi_states', $states ); |
| 1734 |
} |
| 1735 |
|
| 1736 |
/** |
| 1737 |
* Get Argentina States |
| 1738 |
* |
| 1739 |
* @since 1.8.12 |
| 1740 |
* @return array $states A list of states |
| 1741 |
*/ |
| 1742 |
function give_get_argentina_states_list() { |
| 1743 |
$states = [ |
| 1744 |
'' => '', |
| 1745 |
'C' => __( 'Ciudad Autónoma de Buenos Aires', 'give' ), |
| 1746 |
'B' => __( 'Buenos Aires', 'give' ), |
| 1747 |
'K' => __( 'Catamarca', 'give' ), |
| 1748 |
'H' => __( 'Chaco', 'give' ), |
| 1749 |
'U' => __( 'Chubut', 'give' ), |
| 1750 |
'X' => __( 'Córdoba', 'give' ), |
| 1751 |
'W' => __( 'Corrientes', 'give' ), |
| 1752 |
'E' => __( 'Entre Ríos', 'give' ), |
| 1753 |
'P' => __( 'Formosa', 'give' ), |
| 1754 |
'Y' => __( 'Jujuy', 'give' ), |
| 1755 |
'L' => __( 'La Pampa', 'give' ), |
| 1756 |
'F' => __( 'La Rioja', 'give' ), |
| 1757 |
'M' => __( 'Mendoza', 'give' ), |
| 1758 |
'N' => __( 'Misiones', 'give' ), |
| 1759 |
'Q' => __( 'Neuquén', 'give' ), |
| 1760 |
'R' => __( 'Río Negro', 'give' ), |
| 1761 |
'A' => __( 'Salta', 'give' ), |
| 1762 |
'J' => __( 'San Juan', 'give' ), |
| 1763 |
'D' => __( 'San Luis', 'give' ), |
| 1764 |
'Z' => __( 'Santa Cruz', 'give' ), |
| 1765 |
'S' => __( 'Santa Fe', 'give' ), |
| 1766 |
'G' => __( 'Santiago del Estero', 'give' ), |
| 1767 |
'V' => __( 'Tierra del Fuego', 'give' ), |
| 1768 |
'T' => __( 'Tucumán', 'give' ), |
| 1769 |
]; |
| 1770 |
|
| 1771 |
return apply_filters( 'give_argentina_states', $states ); |
| 1772 |
} |
| 1773 |
|
| 1774 |
/** |
| 1775 |
* Get States List |
| 1776 |
* |
| 1777 |
* @access public |
| 1778 |
* @since 1.2 |
| 1779 |
* @return array |
| 1780 |
*/ |
| 1781 |
function give_get_states_list() { |
| 1782 |
$states = [ |
| 1783 |
'' => '', |
| 1784 |
'AL' => 'Alabama', |
| 1785 |
'AK' => 'Alaska', |
| 1786 |
'AZ' => 'Arizona', |
| 1787 |
'AR' => 'Arkansas', |
| 1788 |
'CA' => 'California', |
| 1789 |
'CO' => 'Colorado', |
| 1790 |
'CT' => 'Connecticut', |
| 1791 |
'DE' => 'Delaware', |
| 1792 |
'DC' => 'District of Columbia', |
| 1793 |
'FL' => 'Florida', |
| 1794 |
'GA' => 'Georgia', |
| 1795 |
'HI' => 'Hawaii', |
| 1796 |
'ID' => 'Idaho', |
| 1797 |
'IL' => 'Illinois', |
| 1798 |
'IN' => 'Indiana', |
| 1799 |
'IA' => 'Iowa', |
| 1800 |
'KS' => 'Kansas', |
| 1801 |
'KY' => 'Kentucky', |
| 1802 |
'LA' => 'Louisiana', |
| 1803 |
'ME' => 'Maine', |
| 1804 |
'MD' => 'Maryland', |
| 1805 |
'MA' => 'Massachusetts', |
| 1806 |
'MI' => 'Michigan', |
| 1807 |
'MN' => 'Minnesota', |
| 1808 |
'MS' => 'Mississippi', |
| 1809 |
'MO' => 'Missouri', |
| 1810 |
'MT' => 'Montana', |
| 1811 |
'NE' => 'Nebraska', |
| 1812 |
'NV' => 'Nevada', |
| 1813 |
'NH' => 'New Hampshire', |
| 1814 |
'NJ' => 'New Jersey', |
| 1815 |
'NM' => 'New Mexico', |
| 1816 |
'NY' => 'New York', |
| 1817 |
'NC' => 'North Carolina', |
| 1818 |
'ND' => 'North Dakota', |
| 1819 |
'OH' => 'Ohio', |
| 1820 |
'OK' => 'Oklahoma', |
| 1821 |
'OR' => 'Oregon', |
| 1822 |
'PA' => 'Pennsylvania', |
| 1823 |
'RI' => 'Rhode Island', |
| 1824 |
'SC' => 'South Carolina', |
| 1825 |
'SD' => 'South Dakota', |
| 1826 |
'TN' => 'Tennessee', |
| 1827 |
'TX' => 'Texas', |
| 1828 |
'UT' => 'Utah', |
| 1829 |
'VT' => 'Vermont', |
| 1830 |
'VA' => 'Virginia', |
| 1831 |
'WA' => 'Washington', |
| 1832 |
'WV' => 'West Virginia', |
| 1833 |
'WI' => 'Wisconsin', |
| 1834 |
'WY' => 'Wyoming', |
| 1835 |
'AS' => 'American Samoa', |
| 1836 |
'CZ' => 'Canal Zone', |
| 1837 |
'CM' => 'Commonwealth of the Northern Mariana Islands', |
| 1838 |
'FM' => 'Federated States of Micronesia', |
| 1839 |
'GU' => 'Guam', |
| 1840 |
'MH' => 'Marshall Islands', |
| 1841 |
'MP' => 'Northern Mariana Islands', |
| 1842 |
'PW' => 'Palau', |
| 1843 |
'PI' => 'Philippine Islands', |
| 1844 |
'PR' => 'Puerto Rico', |
| 1845 |
'TT' => 'Trust Territory of the Pacific Islands', |
| 1846 |
'VI' => 'Virgin Islands', |
| 1847 |
'AA' => 'Armed Forces - Americas', |
| 1848 |
'AE' => 'Armed Forces - Europe, Canada, Middle East, Africa', |
| 1849 |
'AP' => 'Armed Forces - Pacific', |
| 1850 |
]; |
| 1851 |
|
| 1852 |
return apply_filters( 'give_us_states', $states ); |
| 1853 |
} |
| 1854 |
|
| 1855 |
/** |
| 1856 |
* Get Provinces List |
| 1857 |
* |
| 1858 |
* @access public |
| 1859 |
* @since 1.0 |
| 1860 |
* @return array |
| 1861 |
*/ |
| 1862 |
function give_get_provinces_list() { |
| 1863 |
$provinces = [ |
| 1864 |
'' => '', |
| 1865 |
'AB' => esc_html__( 'Alberta', 'give' ), |
| 1866 |
'BC' => esc_html__( 'British Columbia', 'give' ), |
| 1867 |
'MB' => esc_html__( 'Manitoba', 'give' ), |
| 1868 |
'NB' => esc_html__( 'New Brunswick', 'give' ), |
| 1869 |
'NL' => esc_html__( 'Newfoundland and Labrador', 'give' ), |
| 1870 |
'NS' => esc_html__( 'Nova Scotia', 'give' ), |
| 1871 |
'NT' => esc_html__( 'Northwest Territories', 'give' ), |
| 1872 |
'NU' => esc_html__( 'Nunavut', 'give' ), |
| 1873 |
'ON' => esc_html__( 'Ontario', 'give' ), |
| 1874 |
'PE' => esc_html__( 'Prince Edward Island', 'give' ), |
| 1875 |
'QC' => esc_html__( 'Quebec', 'give' ), |
| 1876 |
'SK' => esc_html__( 'Saskatchewan', 'give' ), |
| 1877 |
'YT' => esc_html__( 'Yukon', 'give' ), |
| 1878 |
]; |
| 1879 |
|
| 1880 |
return apply_filters( 'give_canada_provinces', $provinces ); |
| 1881 |
} |
| 1882 |
|
| 1883 |
/** |
| 1884 |
* Get Australian States |
| 1885 |
* |
| 1886 |
* @since 1.0 |
| 1887 |
* @return array $states A list of states |
| 1888 |
*/ |
| 1889 |
function give_get_australian_states_list() { |
| 1890 |
$states = [ |
| 1891 |
'' => '', |
| 1892 |
'ACT' => 'Australian Capital Territory', |
| 1893 |
'NSW' => 'New South Wales', |
| 1894 |
'NT' => 'Northern Territory', |
| 1895 |
'QLD' => 'Queensland', |
| 1896 |
'SA' => 'South Australia', |
| 1897 |
'TAS' => 'Tasmania', |
| 1898 |
'VIC' => 'Victoria', |
| 1899 |
'WA' => 'Western Australia', |
| 1900 |
]; |
| 1901 |
|
| 1902 |
return apply_filters( 'give_australian_states', $states ); |
| 1903 |
} |
| 1904 |
|
| 1905 |
/** |
| 1906 |
* Get Brazil States |
| 1907 |
* |
| 1908 |
* @since 1.0 |
| 1909 |
* @return array $states A list of states |
| 1910 |
*/ |
| 1911 |
function give_get_brazil_states_list() { |
| 1912 |
$states = [ |
| 1913 |
'' => '', |
| 1914 |
'AC' => 'Acre', |
| 1915 |
'AL' => 'Alagoas', |
| 1916 |
'AP' => 'Amapá', |
| 1917 |
'AM' => 'Amazonas', |
| 1918 |
'BA' => 'Bahia', |
| 1919 |
'CE' => 'Ceará', |
| 1920 |
'DF' => 'Distrito Federal', |
| 1921 |
'ES' => 'Espírito Santo', |
| 1922 |
'GO' => 'Goiás', |
| 1923 |
'MA' => 'Maranhão', |
| 1924 |
'MT' => 'Mato Grosso', |
| 1925 |
'MS' => 'Mato Grosso do Sul', |
| 1926 |
'MG' => 'Minas Gerais', |
| 1927 |
'PA' => 'Pará', |
| 1928 |
'PB' => 'Paraíba', |
| 1929 |
'PR' => 'Paraná', |
| 1930 |
'PE' => 'Pernambuco', |
| 1931 |
'PI' => 'Piauí', |
| 1932 |
'RJ' => 'Rio de Janeiro', |
| 1933 |
'RN' => 'Rio Grande do Norte', |
| 1934 |
'RS' => 'Rio Grande do Sul', |
| 1935 |
'RO' => 'Rondônia', |
| 1936 |
'RR' => 'Roraima', |
| 1937 |
'SC' => 'Santa Catarina', |
| 1938 |
'SP' => 'São Paulo', |
| 1939 |
'SE' => 'Sergipe', |
| 1940 |
'TO' => 'Tocantins', |
| 1941 |
]; |
| 1942 |
|
| 1943 |
return apply_filters( 'give_brazil_states', $states ); |
| 1944 |
} |
| 1945 |
|
| 1946 |
/** |
| 1947 |
* Get Hong Kong States |
| 1948 |
* |
| 1949 |
* @since 1.0 |
| 1950 |
* @return array $states A list of states |
| 1951 |
*/ |
| 1952 |
function give_get_hong_kong_states_list() { |
| 1953 |
$states = [ |
| 1954 |
'' => '', |
| 1955 |
'HONG KONG' => 'Hong Kong Island', |
| 1956 |
'KOWLOON' => 'Kowloon', |
| 1957 |
'NEW TERRITORIES' => 'New Territories', |
| 1958 |
]; |
| 1959 |
|
| 1960 |
return apply_filters( 'give_hong_kong_states', $states ); |
| 1961 |
} |
| 1962 |
|
| 1963 |
/** |
| 1964 |
* Get Hungary States |
| 1965 |
* |
| 1966 |
* @since 1.0 |
| 1967 |
* @return array $states A list of states |
| 1968 |
*/ |
| 1969 |
function give_get_hungary_states_list() { |
| 1970 |
$states = [ |
| 1971 |
'' => '', |
| 1972 |
'BK' => 'Bács-Kiskun', |
| 1973 |
'BE' => 'Békés', |
| 1974 |
'BA' => 'Baranya', |
| 1975 |
'BZ' => 'Borsod-Abaúj-Zemplén', |
| 1976 |
'BU' => 'Budapest', |
| 1977 |
'CS' => 'Csongrád', |
| 1978 |
'FE' => 'Fejér', |
| 1979 |
'GS' => 'Győr-Moson-Sopron', |
| 1980 |
'HB' => 'Hajdú-Bihar', |
| 1981 |
'HE' => 'Heves', |
| 1982 |
'JN' => 'Jász-Nagykun-Szolnok', |
| 1983 |
'KE' => 'Komárom-Esztergom', |
| 1984 |
'NO' => 'Nógrád', |
| 1985 |
'PE' => 'Pest', |
| 1986 |
'SO' => 'Somogy', |
| 1987 |
'SZ' => 'Szabolcs-Szatmár-Bereg', |
| 1988 |
'TO' => 'Tolna', |
| 1989 |
'VA' => 'Vas', |
| 1990 |
'VE' => 'Veszprém', |
| 1991 |
'ZA' => 'Zala', |
| 1992 |
]; |
| 1993 |
|
| 1994 |
return apply_filters( 'give_hungary_states', $states ); |
| 1995 |
} |
| 1996 |
|
| 1997 |
/** |
| 1998 |
* Get Chinese States |
| 1999 |
* |
| 2000 |
* @since 1.0 |
| 2001 |
* @return array $states A list of states |
| 2002 |
*/ |
| 2003 |
function give_get_chinese_states_list() { |
| 2004 |
$states = [ |
| 2005 |
'' => '', |
| 2006 |
'CN1' => 'Yunnan / 云南', |
| 2007 |
'CN2' => 'Beijing / 北京', |
| 2008 |
'CN3' => 'Tianjin / 天津', |
| 2009 |
'CN4' => 'Hebei / 河北', |
| 2010 |
'CN5' => 'Shanxi / 山西', |
| 2011 |
'CN6' => 'Inner Mongolia / 內蒙古', |
| 2012 |
'CN7' => 'Liaoning / 辽宁', |
| 2013 |
'CN8' => 'Jilin / 吉林', |
| 2014 |
'CN9' => 'Heilongjiang / 黑龙江', |
| 2015 |
'CN10' => 'Shanghai / 上海', |
| 2016 |
'CN11' => 'Jiangsu / 江苏', |
| 2017 |
'CN12' => 'Zhejiang / 浙江', |
| 2018 |
'CN13' => 'Anhui / 安徽', |
| 2019 |
'CN14' => 'Fujian / 福建', |
| 2020 |
'CN15' => 'Jiangxi / 江西', |
| 2021 |
'CN16' => 'Shandong / 山东', |
| 2022 |
'CN17' => 'Henan / 河南', |
| 2023 |
'CN18' => 'Hubei / 湖北', |
| 2024 |
'CN19' => 'Hunan / 湖南', |
| 2025 |
'CN20' => 'Guangdong / 广东', |
| 2026 |
'CN21' => 'Guangxi Zhuang / 广西壮族', |
| 2027 |
'CN22' => 'Hainan / 海南', |
| 2028 |
'CN23' => 'Chongqing / 重庆', |
| 2029 |
'CN24' => 'Sichuan / 四川', |
| 2030 |
'CN25' => 'Guizhou / 贵州', |
| 2031 |
'CN26' => 'Shaanxi / 陕西', |
| 2032 |
'CN27' => 'Gansu / 甘肃', |
| 2033 |
'CN28' => 'Qinghai / 青海', |
| 2034 |
'CN29' => 'Ningxia Hui / 宁夏', |
| 2035 |
'CN30' => 'Macau / 澳门', |
| 2036 |
'CN31' => 'Tibet / 西藏', |
| 2037 |
'CN32' => 'Xinjiang / 新疆', |
| 2038 |
]; |
| 2039 |
|
| 2040 |
return apply_filters( 'give_chinese_states', $states ); |
| 2041 |
} |
| 2042 |
|
| 2043 |
/** |
| 2044 |
* Get New Zealand States |
| 2045 |
* |
| 2046 |
* @since 1.0 |
| 2047 |
* @return array $states A list of states |
| 2048 |
*/ |
| 2049 |
function give_get_new_zealand_states_list() { |
| 2050 |
$states = [ |
| 2051 |
'' => '', |
| 2052 |
'AK' => 'Auckland', |
| 2053 |
'BP' => 'Bay of Plenty', |
| 2054 |
'CT' => 'Canterbury', |
| 2055 |
'HB' => 'Hawke’s Bay', |
| 2056 |
'MW' => 'Manawatu-Wanganui', |
| 2057 |
'MB' => 'Marlborough', |
| 2058 |
'NS' => 'Nelson', |
| 2059 |
'NL' => 'Northland', |
| 2060 |
'OT' => 'Otago', |
| 2061 |
'SL' => 'Southland', |
| 2062 |
'TK' => 'Taranaki', |
| 2063 |
'TM' => 'Tasman', |
| 2064 |
'WA' => 'Waikato', |
| 2065 |
'WE' => 'Wellington', |
| 2066 |
'WC' => 'West Coast', |
| 2067 |
]; |
| 2068 |
|
| 2069 |
return apply_filters( 'give_new_zealand_states', $states ); |
| 2070 |
} |
| 2071 |
|
| 2072 |
/** |
| 2073 |
* Get Indonesian States |
| 2074 |
* |
| 2075 |
* @since 1.0 |
| 2076 |
* @return array $states A list of states |
| 2077 |
*/ |
| 2078 |
function give_get_indonesian_states_list() { |
| 2079 |
$states = [ |
| 2080 |
'' => '', |
| 2081 |
'AC' => 'Daerah Istimewa Aceh', |
| 2082 |
'SU' => 'Sumatera Utara', |
| 2083 |
'SB' => 'Sumatera Barat', |
| 2084 |
'RI' => 'Riau', |
| 2085 |
'KR' => 'Kepulauan Riau', |
| 2086 |
'JA' => 'Jambi', |
| 2087 |
'SS' => 'Sumatera Selatan', |
| 2088 |
'BB' => 'Bangka Belitung', |
| 2089 |
'BE' => 'Bengkulu', |
| 2090 |
'LA' => 'Lampung', |
| 2091 |
'JK' => 'DKI Jakarta', |
| 2092 |
'JB' => 'Jawa Barat', |
| 2093 |
'BT' => 'Banten', |
| 2094 |
'JT' => 'Jawa Tengah', |
| 2095 |
'JI' => 'Jawa Timur', |
| 2096 |
'YO' => 'Daerah Istimewa Yogyakarta', |
| 2097 |
'BA' => 'Bali', |
| 2098 |
'NB' => 'Nusa Tenggara Barat', |
| 2099 |
'NT' => 'Nusa Tenggara Timur', |
| 2100 |
'KB' => 'Kalimantan Barat', |
| 2101 |
'KT' => 'Kalimantan Tengah', |
| 2102 |
'KI' => 'Kalimantan Timur', |
| 2103 |
'KS' => 'Kalimantan Selatan', |
| 2104 |
'KU' => 'Kalimantan Utara', |
| 2105 |
'SA' => 'Sulawesi Utara', |
| 2106 |
'ST' => 'Sulawesi Tengah', |
| 2107 |
'SG' => 'Sulawesi Tenggara', |
| 2108 |
'SR' => 'Sulawesi Barat', |
| 2109 |
'SN' => 'Sulawesi Selatan', |
| 2110 |
'GO' => 'Gorontalo', |
| 2111 |
'MA' => 'Maluku', |
| 2112 |
'MU' => 'Maluku Utara', |
| 2113 |
'PA' => 'Papua', |
| 2114 |
'PB' => 'Papua Barat', |
| 2115 |
]; |
| 2116 |
|
| 2117 |
return apply_filters( 'give_indonesia_states', $states ); |
| 2118 |
} |
| 2119 |
|
| 2120 |
/** |
| 2121 |
* Get Indian States |
| 2122 |
* |
| 2123 |
* @link https://en.wikipedia.org/wiki/ISO_3166-2:IN |
| 2124 |
* @link https://www.iso.org/obp/ui/#iso:code:3166:IN |
| 2125 |
* |
| 2126 |
* @since 3.19.1 Changed subdivision code for Odisha (OD) |
| 2127 |
* @since 2.11.0 Renamed Indian state of Orissa to Odisha (#5826) |
| 2128 |
* @since 1.0 |
| 2129 |
* |
| 2130 |
* @return array $states A list of states |
| 2131 |
*/ |
| 2132 |
function give_get_indian_states_list() { |
| 2133 |
$states = [ |
| 2134 |
'' => '', |
| 2135 |
'AP' => 'Andhra Pradesh', |
| 2136 |
'AR' => 'Arunachal Pradesh', |
| 2137 |
'AS' => 'Assam', |
| 2138 |
'BR' => 'Bihar', |
| 2139 |
'CT' => 'Chhattisgarh', |
| 2140 |
'GA' => 'Goa', |
| 2141 |
'GJ' => 'Gujarat', |
| 2142 |
'HR' => 'Haryana', |
| 2143 |
'HP' => 'Himachal Pradesh', |
| 2144 |
'JK' => 'Jammu and Kashmir', |
| 2145 |
'JH' => 'Jharkhand', |
| 2146 |
'KA' => 'Karnataka', |
| 2147 |
'KL' => 'Kerala', |
| 2148 |
'MP' => 'Madhya Pradesh', |
| 2149 |
'MH' => 'Maharashtra', |
| 2150 |
'MN' => 'Manipur', |
| 2151 |
'ML' => 'Meghalaya', |
| 2152 |
'MZ' => 'Mizoram', |
| 2153 |
'NL' => 'Nagaland', |
| 2154 |
'OD' => 'Odisha', |
| 2155 |
'PB' => 'Punjab', |
| 2156 |
'RJ' => 'Rajasthan', |
| 2157 |
'SK' => 'Sikkim', |
| 2158 |
'TN' => 'Tamil Nadu', |
| 2159 |
'TG' => 'Telangana', |
| 2160 |
'TR' => 'Tripura', |
| 2161 |
'UT' => 'Uttarakhand', |
| 2162 |
'UP' => 'Uttar Pradesh', |
| 2163 |
'WB' => 'West Bengal', |
| 2164 |
'AN' => 'Andaman and Nicobar Islands', |
| 2165 |
'CH' => 'Chandigarh', |
| 2166 |
'DN' => 'Dadar and Nagar Haveli', |
| 2167 |
'DD' => 'Daman and Diu', |
| 2168 |
'DL' => 'Delhi', |
| 2169 |
'LD' => 'Lakshadweep', |
| 2170 |
'PY' => 'Pondicherry (Puducherry)', |
| 2171 |
]; |
| 2172 |
|
| 2173 |
return apply_filters( 'give_indian_states', $states ); |
| 2174 |
} |
| 2175 |
|
| 2176 |
/** |
| 2177 |
* Get Malaysian States |
| 2178 |
* |
| 2179 |
* @since 1.6 |
| 2180 |
* @return array $states A list of states |
| 2181 |
*/ |
| 2182 |
function give_get_malaysian_states_list() { |
| 2183 |
$states = [ |
| 2184 |
'' => '', |
| 2185 |
'JHR' => 'Johor', |
| 2186 |
'KDH' => 'Kedah', |
| 2187 |
'KTN' => 'Kelantan', |
| 2188 |
'MLK' => 'Melaka', |
| 2189 |
'NSN' => 'Negeri Sembilan', |
| 2190 |
'PHG' => 'Pahang', |
| 2191 |
'PRK' => 'Perak', |
| 2192 |
'PLS' => 'Perlis', |
| 2193 |
'PNG' => 'Pulau Pinang', |
| 2194 |
'SBH' => 'Sabah', |
| 2195 |
'SWK' => 'Sarawak', |
| 2196 |
'SGR' => 'Selangor', |
| 2197 |
'TRG' => 'Terengganu', |
| 2198 |
'KUL' => 'W.P. Kuala Lumpur', |
| 2199 |
'LBN' => 'W.P. Labuan', |
| 2200 |
'PJY' => 'W.P. Putrajaya', |
| 2201 |
]; |
| 2202 |
|
| 2203 |
return apply_filters( 'give_malaysian_states', $states ); |
| 2204 |
} |
| 2205 |
|
| 2206 |
/** |
| 2207 |
* Get South African States |
| 2208 |
* |
| 2209 |
* @since 1.6 |
| 2210 |
* @return array $states A list of states |
| 2211 |
*/ |
| 2212 |
function give_get_south_african_states_list() { |
| 2213 |
$states = [ |
| 2214 |
'' => '', |
| 2215 |
'EC' => 'Eastern Cape', |
| 2216 |
'FS' => 'Free State', |
| 2217 |
'GP' => 'Gauteng', |
| 2218 |
'KZN' => 'KwaZulu-Natal', |
| 2219 |
'LP' => 'Limpopo', |
| 2220 |
'MP' => 'Mpumalanga', |
| 2221 |
'NC' => 'Northern Cape', |
| 2222 |
'NW' => 'North West', |
| 2223 |
'WC' => 'Western Cape', |
| 2224 |
]; |
| 2225 |
|
| 2226 |
return apply_filters( 'give_south_african_states', $states ); |
| 2227 |
} |
| 2228 |
|
| 2229 |
/** |
| 2230 |
* Get Thailand States |
| 2231 |
* |
| 2232 |
* @since 1.6 |
| 2233 |
* @return array $states A list of states |
| 2234 |
*/ |
| 2235 |
function give_get_thailand_states_list() { |
| 2236 |
$states = [ |
| 2237 |
'' => '', |
| 2238 |
'TH-37' => 'Amnat Charoen (อำนาจเจริญ)', |
| 2239 |
'TH-15' => 'Ang Thong (อ่างทอง)', |
| 2240 |
'TH-14' => 'Ayutthaya (พระนครศรีอยุธยา)', |
| 2241 |
'TH-10' => 'Bangkok (กรุงเทพมหานคร)', |
| 2242 |
'TH-38' => 'Bueng Kan (บึงกาฬ)', |
| 2243 |
'TH-31' => 'Buri Ram (บุรีรัมย์)', |
| 2244 |
'TH-24' => 'Chachoengsao (ฉะเชิงเทรา)', |
| 2245 |
'TH-18' => 'Chai Nat (ชัยนาท)', |
| 2246 |
'TH-36' => 'Chaiyaphum (ชัยภูมิ)', |
| 2247 |
'TH-22' => 'Chanthaburi (จันทบุรี)', |
| 2248 |
'TH-50' => 'Chiang Mai (เชียงใหม่)', |
| 2249 |
'TH-57' => 'Chiang Rai (เชียงราย)', |
| 2250 |
'TH-20' => 'Chonburi (ชลบุรี)', |
| 2251 |
'TH-86' => 'Chumphon (ชุมพร)', |
| 2252 |
'TH-46' => 'Kalasin (กาฬสินธุ์)', |
| 2253 |
'TH-62' => 'Kamphaeng Phet (กำแพงเพชร)', |
| 2254 |
'TH-71' => 'Kanchanaburi (กาญจนบุรี)', |
| 2255 |
'TH-40' => 'Khon Kaen (ขอนแก่น)', |
| 2256 |
'TH-81' => 'Krabi (กระบี่)', |
| 2257 |
'TH-52' => 'Lampang (ลำปาง)', |
| 2258 |
'TH-51' => 'Lamphun (ลำพูน)', |
| 2259 |
'TH-42' => 'Loei (เลย)', |
| 2260 |
'TH-16' => 'Lopburi (ลพบุรี)', |
| 2261 |
'TH-58' => 'Mae Hong Son (แม่ฮ่องสอน)', |
| 2262 |
'TH-44' => 'Maha Sarakham (มหาสารคาม)', |
| 2263 |
'TH-49' => 'Mukdahan (มุกดาหาร)', |
| 2264 |
'TH-26' => 'Nakhon Nayok (นครนายก)', |
| 2265 |
'TH-73' => 'Nakhon Pathom (นครปฐม)', |
| 2266 |
'TH-48' => 'Nakhon Phanom (นครพนม)', |
| 2267 |
'TH-30' => 'Nakhon Ratchasima (นครราชสีมา)', |
| 2268 |
'TH-60' => 'Nakhon Sawan (นครสวรรค์)', |
| 2269 |
'TH-80' => 'Nakhon Si Thammarat (นครศรีธรรมราช)', |
| 2270 |
'TH-55' => 'Nan (น่าน)', |
| 2271 |
'TH-96' => 'Narathiwat (นราธิวาส)', |
| 2272 |
'TH-39' => 'Nong Bua Lam Phu (หนองบัวลำภู)', |
| 2273 |
'TH-43' => 'Nong Khai (หนองคาย)', |
| 2274 |
'TH-12' => 'Nonthaburi (นนทบุรี)', |
| 2275 |
'TH-13' => 'Pathum Thani (ปทุมธานี)', |
| 2276 |
'TH-94' => 'Pattani (ปัตตานี)', |
| 2277 |
'TH-82' => 'Phang Nga (พังงา)', |
| 2278 |
'TH-93' => 'Phatthalung (พัทลุง)', |
| 2279 |
'TH-56' => 'Phayao (พะเยา)', |
| 2280 |
'TH-67' => 'Phetchabun (เพชรบูรณ์)', |
| 2281 |
'TH-76' => 'Phetchaburi (เพชรบุรี)', |
| 2282 |
'TH-66' => 'Phichit (พิจิตร)', |
| 2283 |
'TH-65' => 'Phitsanulok (พิษณุโลก)', |
| 2284 |
'TH-54' => 'Phrae (แพร่)', |
| 2285 |
'TH-83' => 'Phuket (ภูเก็ต)', |
| 2286 |
'TH-25' => 'Prachin Buri (ปราจีนบุรี)', |
| 2287 |
'TH-77' => 'Prachuap Khiri Khan (ประจวบคีรีขันธ์)', |
| 2288 |
'TH-85' => 'Ranong (ระนอง)', |
| 2289 |
'TH-70' => 'Ratchaburi (ราชบุรี)', |
| 2290 |
'TH-21' => 'Rayong (ระยอง)', |
| 2291 |
'TH-45' => 'Roi Et (ร้อยเอ็ด)', |
| 2292 |
'TH-27' => 'Sa Kaeo (สระแก้ว)', |
| 2293 |
'TH-47' => 'Sakon Nakhon (สกลนคร)', |
| 2294 |
'TH-11' => 'Samut Prakan (สมุทรปราการ)', |
| 2295 |
'TH-74' => 'Samut Sakhon (สมุทรสาคร)', |
| 2296 |
'TH-75' => 'Samut Songkhram (สมุทรสงคราม)', |
| 2297 |
'TH-19' => 'Saraburi (สระบุรี)', |
| 2298 |
'TH-91' => 'Satun (สตูล)', |
| 2299 |
'TH-17' => 'Sing Buri (สิงห์บุรี)', |
| 2300 |
'TH-33' => 'Sisaket (ศรีสะเกษ)', |
| 2301 |
'TH-90' => 'Songkhla (สงขลา)', |
| 2302 |
'TH-64' => 'Sukhothai (สุโขทัย)', |
| 2303 |
'TH-72' => 'Suphan Buri (สุพรรณบุรี)', |
| 2304 |
'TH-84' => 'Surat Thani (สุราษฎร์ธานี)', |
| 2305 |
'TH-32' => 'Surin (สุรินทร์)', |
| 2306 |
'TH-63' => 'Tak (ตาก)', |
| 2307 |
'TH-92' => 'Trang (ตรัง)', |
| 2308 |
'TH-23' => 'Trat (ตราด)', |
| 2309 |
'TH-34' => 'Ubon Ratchathani (อุบลราชธานี)', |
| 2310 |
'TH-41' => 'Udon Thani (อุดรธานี)', |
| 2311 |
'TH-61' => 'Uthai Thani (อุทัยธานี)', |
| 2312 |
'TH-53' => 'Uttaradit (อุตรดิตถ์)', |
| 2313 |
'TH-95' => 'Yala (ยะลา)', |
| 2314 |
'TH-35' => 'Yasothon (ยโสธร)', |
| 2315 |
]; |
| 2316 |
|
| 2317 |
return apply_filters( 'give_thailand_states', $states ); |
| 2318 |
} |
| 2319 |
|
| 2320 |
/** |
| 2321 |
* Get Spain States |
| 2322 |
* |
| 2323 |
* @since 1.0 |
| 2324 |
* @return array $states A list of states |
| 2325 |
*/ |
| 2326 |
function give_get_spain_states_list() { |
| 2327 |
$states = [ |
| 2328 |
'' => '', |
| 2329 |
'C' => esc_html__( 'A Coruña', 'give' ), |
| 2330 |
'VI' => esc_html__( 'Álava', 'give' ), |
| 2331 |
'AB' => esc_html__( 'Albacete', 'give' ), |
| 2332 |
'A' => esc_html__( 'Alicante', 'give' ), |
| 2333 |
'AL' => esc_html__( 'Almería', 'give' ), |
| 2334 |
'O' => esc_html__( 'Asturias', 'give' ), |
| 2335 |
'AV' => esc_html__( 'Ávila', 'give' ), |
| 2336 |
'BA' => esc_html__( 'Badajoz', 'give' ), |
| 2337 |
'PM' => esc_html__( 'Baleares', 'give' ), |
| 2338 |
'B' => esc_html__( 'Barcelona', 'give' ), |
| 2339 |
'BU' => esc_html__( 'Burgos', 'give' ), |
| 2340 |
'CC' => esc_html__( 'Cáceres', 'give' ), |
| 2341 |
'CA' => esc_html__( 'Cádiz', 'give' ), |
| 2342 |
'S' => esc_html__( 'Cantabria', 'give' ), |
| 2343 |
'CS' => esc_html__( 'Castellón', 'give' ), |
| 2344 |
'CE' => esc_html__( 'Ceuta', 'give' ), |
| 2345 |
'CR' => esc_html__( 'Ciudad Real', 'give' ), |
| 2346 |
'CO' => esc_html__( 'Córdoba', 'give' ), |
| 2347 |
'CU' => esc_html__( 'Cuenca', 'give' ), |
| 2348 |
'GI' => esc_html__( 'Girona', 'give' ), |
| 2349 |
'GR' => esc_html__( 'Granada', 'give' ), |
| 2350 |
'GU' => esc_html__( 'Guadalajara', 'give' ), |
| 2351 |
'SS' => esc_html__( 'Gipuzkoa', 'give' ), |
| 2352 |
'H' => esc_html__( 'Huelva', 'give' ), |
| 2353 |
'HU' => esc_html__( 'Huesca', 'give' ), |
| 2354 |
'J' => esc_html__( 'Jaén', 'give' ), |
| 2355 |
'LO' => esc_html__( 'La Rioja', 'give' ), |
| 2356 |
'GC' => esc_html__( 'Las Palmas', 'give' ), |
| 2357 |
'LE' => esc_html__( 'León', 'give' ), |
| 2358 |
'L' => esc_html__( 'Lleida', 'give' ), |
| 2359 |
'LU' => esc_html__( 'Lugo', 'give' ), |
| 2360 |
'M' => esc_html__( 'Madrid', 'give' ), |
| 2361 |
'MA' => esc_html__( 'Málaga', 'give' ), |
| 2362 |
'ML' => esc_html__( 'Melilla', 'give' ), |
| 2363 |
'MU' => esc_html__( 'Murcia', 'give' ), |
| 2364 |
'NA' => esc_html__( 'Navarra', 'give' ), |
| 2365 |
'OR' => esc_html__( 'Ourense', 'give' ), |
| 2366 |
'P' => esc_html__( 'Palencia', 'give' ), |
| 2367 |
'PO' => esc_html__( 'Pontevedra', 'give' ), |
| 2368 |
'SA' => esc_html__( 'Salamanca', 'give' ), |
| 2369 |
'TF' => esc_html__( 'Santa Cruz de Tenerife', 'give' ), |
| 2370 |
'SG' => esc_html__( 'Segovia', 'give' ), |
| 2371 |
'SE' => esc_html__( 'Sevilla', 'give' ), |
| 2372 |
'SO' => esc_html__( 'Soria', 'give' ), |
| 2373 |
'T' => esc_html__( 'Tarragona', 'give' ), |
| 2374 |
'TE' => esc_html__( 'Teruel', 'give' ), |
| 2375 |
'TO' => esc_html__( 'Toledo', 'give' ), |
| 2376 |
'V' => esc_html__( 'Valencia', 'give' ), |
| 2377 |
'VA' => esc_html__( 'Valladolid', 'give' ), |
| 2378 |
'BI' => esc_html__( 'Bizkaia', 'give' ), |
| 2379 |
'ZA' => esc_html__( 'Zamora', 'give' ), |
| 2380 |
'Z' => esc_html__( 'Zaragoza', 'give' ), |
| 2381 |
]; |
| 2382 |
|
| 2383 |
return apply_filters( 'give_spain_states', $states ); |
| 2384 |
} |
| 2385 |
|
| 2386 |
/** |
| 2387 |
* Get Country List without postcodes |
| 2388 |
* |
| 2389 |
* @since 2.8.0 |
| 2390 |
* @return array $countries A list of countries without postcodes. |
| 2391 |
*/ |
| 2392 |
function give_get_country_list_without_postcodes() { |
| 2393 |
$countries = [ |
| 2394 |
'AO' => esc_html__( 'Angola', 'give' ), |
| 2395 |
'AG' => esc_html__( 'Antigua and Barbuda', 'give' ), |
| 2396 |
'AW' => esc_html__( 'Aruba', 'give' ), |
| 2397 |
'BS' => esc_html__( 'Bahamas', 'give' ), |
| 2398 |
'BZ' => esc_html__( 'Belize', 'give' ), |
| 2399 |
'BJ' => esc_html__( 'Benin', 'give' ), |
| 2400 |
'BW' => esc_html__( 'Botswana', 'give' ), |
| 2401 |
'BF' => esc_html__( 'Burkina Faso', 'give' ), |
| 2402 |
'BI' => esc_html__( 'Burundi', 'give' ), |
| 2403 |
'CM' => esc_html__( 'Cameroon', 'give' ), |
| 2404 |
'CF' => esc_html__( 'Central African Republic', 'give' ), |
| 2405 |
'KM' => esc_html__( 'Comoros', 'give' ), |
| 2406 |
'CD' => esc_html__( 'Congo, Democratic People\'s Republic', 'give' ), |
| 2407 |
'CG' => esc_html__( 'Congo, Republic of', 'give' ), |
| 2408 |
'CK' => esc_html__( 'Cook Islands', 'give' ), |
| 2409 |
'CI' => esc_html__( 'Cote d\'Ivoire', 'give' ), |
| 2410 |
'DJ' => esc_html__( 'Djibouti', 'give' ), |
| 2411 |
'DM' => esc_html__( 'Dominica', 'give' ), |
| 2412 |
'GQ' => esc_html__( 'Equatorial Guinea', 'give' ), |
| 2413 |
'ER' => esc_html__( 'Eritrea', 'give' ), |
| 2414 |
'FJ' => esc_html__( 'Fiji', 'give' ), |
| 2415 |
'TF' => esc_html__( 'French Southern Territories', 'give' ), |
| 2416 |
'GM' => esc_html__( 'Gambia', 'give' ), |
| 2417 |
'GH' => esc_html__( 'Ghana', 'give' ), |
| 2418 |
'GD' => esc_html__( 'Grenada', 'give' ), |
| 2419 |
'GN' => esc_html__( 'Guinea', 'give' ), |
| 2420 |
'GY' => esc_html__( 'Guyana', 'give' ), |
| 2421 |
'HK' => esc_html__( 'Hong Kong', 'give' ), |
| 2422 |
'IE' => esc_html__( 'Ireland', 'give' ), |
| 2423 |
'JM' => esc_html__( 'Jamaica', 'give' ), |
| 2424 |
'KE' => esc_html__( 'Kenya', 'give' ), |
| 2425 |
'KI' => esc_html__( 'Kiribati', 'give' ), |
| 2426 |
'MO' => esc_html__( 'Macau', 'give' ), |
| 2427 |
'MW' => esc_html__( 'Malawi', 'give' ), |
| 2428 |
'ML' => esc_html__( 'Mali', 'give' ), |
| 2429 |
'MR' => esc_html__( 'Mauritania', 'give' ), |
| 2430 |
'MU' => esc_html__( 'Mauritius', 'give' ), |
| 2431 |
'MS' => esc_html__( 'Montserrat', 'give' ), |
| 2432 |
'NR' => esc_html__( 'Nauru', 'give' ), |
| 2433 |
'AN' => esc_html__( 'Netherlands Antilles', 'give' ), |
| 2434 |
'NU' => esc_html__( 'Niue', 'give' ), |
| 2435 |
'KP' => esc_html__( 'North Korea', 'give' ), |
| 2436 |
'PA' => esc_html__( 'Panama', 'give' ), |
| 2437 |
'QA' => esc_html__( 'Qatar', 'give' ), |
| 2438 |
'RW' => esc_html__( 'Rwanda', 'give' ), |
| 2439 |
'KN' => esc_html__( 'Saint Kitts and Nevis', 'give' ), |
| 2440 |
'LC' => esc_html__( 'Saint Lucia', 'give' ), |
| 2441 |
'ST' => esc_html__( 'Sao Tome and Principe', 'give' ), |
| 2442 |
'SC' => esc_html__( 'Seychelles', 'give' ), |
| 2443 |
'SL' => esc_html__( 'Sierra Leone', 'give' ), |
| 2444 |
'SB' => esc_html__( 'Solomon Islands', 'give' ), |
| 2445 |
'SO' => esc_html__( 'Somalia', 'give' ), |
| 2446 |
'ZA' => esc_html__( 'South Africa', 'give' ), |
| 2447 |
'SR' => esc_html__( 'Suriname', 'give' ), |
| 2448 |
'SY' => esc_html__( 'Syrian Arab Republic', 'give' ), |
| 2449 |
'TZ' => esc_html__( 'Tanzania', 'give' ), |
| 2450 |
'TK' => esc_html__( 'Tokelau', 'give' ), |
| 2451 |
'TO' => esc_html__( 'Tonga', 'give' ), |
| 2452 |
'TT' => esc_html__( 'Trinidad and Tobago', 'give' ), |
| 2453 |
'TV' => esc_html__( 'Tuvalu', 'give' ), |
| 2454 |
'UG' => esc_html__( 'Uganda', 'give' ), |
| 2455 |
'AE' => esc_html__( 'United Arab Emirates', 'give' ), |
| 2456 |
'VU' => esc_html__( 'Vanuatu', 'give' ), |
| 2457 |
'YE' => esc_html__( 'Yemen', 'give' ), |
| 2458 |
'ZW' => esc_html__( 'Zimbabwe', 'give' ), |
| 2459 |
]; |
| 2460 |
|
| 2461 |
/** |
| 2462 |
* Filter list of countries without postcodes |
| 2463 |
* |
| 2464 |
* @since 2.8.0 |
| 2465 |
*/ |
| 2466 |
return (array) apply_filters( 'give_countries_without_postcodes', $countries ); |
| 2467 |
} |
| 2468 |
|