/** * Get the countries being used and available for the plugin. * * @param string $postId The post ID. * @param bool $useDefault Should we use the defaults? * * @return array The countries array. */ public static function constructCountries($postId = '', $useDefault = true) { if (tribe_get_option('tribeEventsCountries') != '') { $countries = array("" => __("Select a Country:", 'tribe-events-calendar')); $country_rows = explode("\n", tribe_get_option('tribeEventsCountries')); foreach ($country_rows as $crow) { $country = explode(",", $crow); if (isset($country[0]) && isset($country[1])) { $country[0] = trim($country[0]); $country[1] = trim($country[1]); if ($country[0] && $country[1]) { $countries[$country[0]] = $country[1]; } } } } if (!isset($countries) || !is_array($countries) || count($countries) == 1) { $countries = array("" => __("Select a Country:", 'tribe-events-calendar'), "US" => __("United States", 'tribe-events-calendar'), "AF" => __("Afghanistan", 'tribe-events-calendar'), "AL" => __("Albania", 'tribe-events-calendar'), "DZ" => __("Algeria", 'tribe-events-calendar'), "AS" => __("American Samoa", 'tribe-events-calendar'), "AD" => __("Andorra", 'tribe-events-calendar'), "AO" => __("Angola", 'tribe-events-calendar'), "AI" => __("Anguilla", 'tribe-events-calendar'), "AQ" => __("Antarctica", 'tribe-events-calendar'), "AG" => __("Antigua And Barbuda", 'tribe-events-calendar'), "AR" => __("Argentina", 'tribe-events-calendar'), "AM" => __("Armenia", 'tribe-events-calendar'), "AW" => __("Aruba", 'tribe-events-calendar'), "AU" => __("Australia", 'tribe-events-calendar'), "AT" => __("Austria", 'tribe-events-calendar'), "AZ" => __("Azerbaijan", 'tribe-events-calendar'), "BS" => __("Bahamas", 'tribe-events-calendar'), "BH" => __("Bahrain", 'tribe-events-calendar'), "BD" => __("Bangladesh", 'tribe-events-calendar'), "BB" => __("Barbados", 'tribe-events-calendar'), "BY" => __("Belarus", 'tribe-events-calendar'), "BE" => __("Belgium", 'tribe-events-calendar'), "BZ" => __("Belize", 'tribe-events-calendar'), "BJ" => __("Benin", 'tribe-events-calendar'), "BM" => __("Bermuda", 'tribe-events-calendar'), "BT" => __("Bhutan", 'tribe-events-calendar'), "BO" => __("Bolivia", 'tribe-events-calendar'), "BA" => __("Bosnia And Herzegowina", 'tribe-events-calendar'), "BW" => __("Botswana", 'tribe-events-calendar'), "BV" => __("Bouvet Island", 'tribe-events-calendar'), "BR" => __("Brazil", 'tribe-events-calendar'), "IO" => __("British Indian Ocean Territory", 'tribe-events-calendar'), "BN" => __("Brunei Darussalam", 'tribe-events-calendar'), "BG" => __("Bulgaria", 'tribe-events-calendar'), "BF" => __("Burkina Faso", 'tribe-events-calendar'), "BI" => __("Burundi", 'tribe-events-calendar'), "KH" => __("Cambodia", 'tribe-events-calendar'), "CM" => __("Cameroon", 'tribe-events-calendar'), "CA" => __("Canada", 'tribe-events-calendar'), "CV" => __("Cape Verde", 'tribe-events-calendar'), "KY" => __("Cayman Islands", 'tribe-events-calendar'), "CF" => __("Central African Republic", 'tribe-events-calendar'), "TD" => __("Chad", 'tribe-events-calendar'), "CL" => __("Chile", 'tribe-events-calendar'), "CN" => __("China", 'tribe-events-calendar'), "CX" => __("Christmas Island", 'tribe-events-calendar'), "CC" => __("Cocos (Keeling) Islands", 'tribe-events-calendar'), "CO" => __("Colombia", 'tribe-events-calendar'), "KM" => __("Comoros", 'tribe-events-calendar'), "CG" => __("Congo", 'tribe-events-calendar'), "CD" => __("Congo, The Democratic Republic Of The", 'tribe-events-calendar'), "CK" => __("Cook Islands", 'tribe-events-calendar'), "CR" => __("Costa Rica", 'tribe-events-calendar'), "CI" => __("Cote D'Ivoire", 'tribe-events-calendar'), "HR" => __("Croatia (Local Name: Hrvatska)", 'tribe-events-calendar'), "CU" => __("Cuba", 'tribe-events-calendar'), "CY" => __("Cyprus", 'tribe-events-calendar'), "CZ" => __("Czech Republic", 'tribe-events-calendar'), "DK" => __("Denmark", 'tribe-events-calendar'), "DJ" => __("Djibouti", 'tribe-events-calendar'), "DM" => __("Dominica", 'tribe-events-calendar'), "DO" => __("Dominican Republic", 'tribe-events-calendar'), "TP" => __("East Timor", 'tribe-events-calendar'), "EC" => __("Ecuador", 'tribe-events-calendar'), "EG" => __("Egypt", 'tribe-events-calendar'), "SV" => __("El Salvador", 'tribe-events-calendar'), "GQ" => __("Equatorial Guinea", 'tribe-events-calendar'), "ER" => __("Eritrea", 'tribe-events-calendar'), "EE" => __("Estonia", 'tribe-events-calendar'), "ET" => __("Ethiopia", 'tribe-events-calendar'), "FK" => __("Falkland Islands (Malvinas)", 'tribe-events-calendar'), "FO" => __("Faroe Islands", 'tribe-events-calendar'), "FJ" => __("Fiji", 'tribe-events-calendar'), "FI" => __("Finland", 'tribe-events-calendar'), "FR" => __("France", 'tribe-events-calendar'), "FX" => __("France, Metropolitan", 'tribe-events-calendar'), "GF" => __("French Guiana", 'tribe-events-calendar'), "PF" => __("French Polynesia", 'tribe-events-calendar'), "TF" => __("French Southern Territories", 'tribe-events-calendar'), "GA" => __("Gabon", 'tribe-events-calendar'), "GM" => __("Gambia", 'tribe-events-calendar'), "GE" => __("Georgia", 'tribe-events-calendar'), "DE" => __("Germany", 'tribe-events-calendar'), "GH" => __("Ghana", 'tribe-events-calendar'), "GI" => __("Gibraltar", 'tribe-events-calendar'), "GR" => __("Greece", 'tribe-events-calendar'), "GL" => __("Greenland", 'tribe-events-calendar'), "GD" => __("Grenada", 'tribe-events-calendar'), "GP" => __("Guadeloupe", 'tribe-events-calendar'), "GU" => __("Guam", 'tribe-events-calendar'), "GT" => __("Guatemala", 'tribe-events-calendar'), "GN" => __("Guinea", 'tribe-events-calendar'), "GW" => __("Guinea-Bissau", 'tribe-events-calendar'), "GY" => __("Guyana", 'tribe-events-calendar'), "HT" => __("Haiti", 'tribe-events-calendar'), "HM" => __("Heard And Mc Donald Islands", 'tribe-events-calendar'), "VA" => __("Holy See (Vatican City State)", 'tribe-events-calendar'), "HN" => __("Honduras", 'tribe-events-calendar'), "HK" => __("Hong Kong", 'tribe-events-calendar'), "HU" => __("Hungary", 'tribe-events-calendar'), "IS" => __("Iceland", 'tribe-events-calendar'), "IN" => __("India", 'tribe-events-calendar'), "ID" => __("Indonesia", 'tribe-events-calendar'), "IR" => __("Iran (Islamic Republic Of)", 'tribe-events-calendar'), "IQ" => __("Iraq", 'tribe-events-calendar'), "IE" => __("Ireland", 'tribe-events-calendar'), "IL" => __("Israel", 'tribe-events-calendar'), "IT" => __("Italy", 'tribe-events-calendar'), "JM" => __("Jamaica", 'tribe-events-calendar'), "JP" => __("Japan", 'tribe-events-calendar'), "JO" => __("Jordan", 'tribe-events-calendar'), "KZ" => __("Kazakhstan", 'tribe-events-calendar'), "KE" => __("Kenya", 'tribe-events-calendar'), "KI" => __("Kiribati", 'tribe-events-calendar'), "KP" => __("Korea, Democratic People's Republic Of", 'tribe-events-calendar'), "KR" => __("Korea, Republic Of", 'tribe-events-calendar'), "KW" => __("Kuwait", 'tribe-events-calendar'), "KG" => __("Kyrgyzstan", 'tribe-events-calendar'), "LA" => __("Lao People's Democratic Republic", 'tribe-events-calendar'), "LV" => __("Latvia", 'tribe-events-calendar'), "LB" => __("Lebanon", 'tribe-events-calendar'), "LS" => __("Lesotho", 'tribe-events-calendar'), "LR" => __("Liberia", 'tribe-events-calendar'), "LY" => __("Libya", 'tribe-events-calendar'), "LI" => __("Liechtenstein", 'tribe-events-calendar'), "LT" => __("Lithuania", 'tribe-events-calendar'), "LU" => __("Luxembourg", 'tribe-events-calendar'), "MO" => __("Macau", 'tribe-events-calendar'), "MK" => __("Macedonia", 'tribe-events-calendar'), "MG" => __("Madagascar", 'tribe-events-calendar'), "MW" => __("Malawi", 'tribe-events-calendar'), "MY" => __("Malaysia", 'tribe-events-calendar'), "MV" => __("Maldives", 'tribe-events-calendar'), "ML" => __("Mali", 'tribe-events-calendar'), "MT" => __("Malta", 'tribe-events-calendar'), "MH" => __("Marshall Islands", 'tribe-events-calendar'), "MQ" => __("Martinique", 'tribe-events-calendar'), "MR" => __("Mauritania", 'tribe-events-calendar'), "MU" => __("Mauritius", 'tribe-events-calendar'), "YT" => __("Mayotte", 'tribe-events-calendar'), "MX" => __("Mexico", 'tribe-events-calendar'), "FM" => __("Micronesia, Federated States Of", 'tribe-events-calendar'), "MD" => __("Moldova, Republic Of", 'tribe-events-calendar'), "MC" => __("Monaco", 'tribe-events-calendar'), "MN" => __("Mongolia", 'tribe-events-calendar'), "ME" => __("Montenegro", 'tribe-events-calendar'), "MS" => __("Montserrat", 'tribe-events-calendar'), "MA" => __("Morocco", 'tribe-events-calendar'), "MZ" => __("Mozambique", 'tribe-events-calendar'), "MM" => __("Myanmar", 'tribe-events-calendar'), "NA" => __("Namibia", 'tribe-events-calendar'), "NR" => __("Nauru", 'tribe-events-calendar'), "NP" => __("Nepal", 'tribe-events-calendar'), "NL" => __("Netherlands", 'tribe-events-calendar'), "AN" => __("Netherlands Antilles", 'tribe-events-calendar'), "NC" => __("New Caledonia", 'tribe-events-calendar'), "NZ" => __("New Zealand", 'tribe-events-calendar'), "NI" => __("Nicaragua", 'tribe-events-calendar'), "NE" => __("Niger", 'tribe-events-calendar'), "NG" => __("Nigeria", 'tribe-events-calendar'), "NU" => __("Niue", 'tribe-events-calendar'), "NF" => __("Norfolk Island", 'tribe-events-calendar'), "MP" => __("Northern Mariana Islands", 'tribe-events-calendar'), "NO" => __("Norway", 'tribe-events-calendar'), "OM" => __("Oman", 'tribe-events-calendar'), "PK" => __("Pakistan", 'tribe-events-calendar'), "PW" => __("Palau", 'tribe-events-calendar'), "PA" => __("Panama", 'tribe-events-calendar'), "PG" => __("Papua New Guinea", 'tribe-events-calendar'), "PY" => __("Paraguay", 'tribe-events-calendar'), "PE" => __("Peru", 'tribe-events-calendar'), "PH" => __("Philippines", 'tribe-events-calendar'), "PN" => __("Pitcairn", 'tribe-events-calendar'), "PL" => __("Poland", 'tribe-events-calendar'), "PT" => __("Portugal", 'tribe-events-calendar'), "PR" => __("Puerto Rico", 'tribe-events-calendar'), "QA" => __("Qatar", 'tribe-events-calendar'), "RE" => __("Reunion", 'tribe-events-calendar'), "RO" => __("Romania", 'tribe-events-calendar'), "RU" => __("Russian Federation", 'tribe-events-calendar'), "RW" => __("Rwanda", 'tribe-events-calendar'), "KN" => __("Saint Kitts And Nevis", 'tribe-events-calendar'), "LC" => __("Saint Lucia", 'tribe-events-calendar'), "VC" => __("Saint Vincent And The Grenadines", 'tribe-events-calendar'), "WS" => __("Samoa", 'tribe-events-calendar'), "SM" => __("San Marino", 'tribe-events-calendar'), "ST" => __("Sao Tome And Principe", 'tribe-events-calendar'), "SA" => __("Saudi Arabia", 'tribe-events-calendar'), "SN" => __("Senegal", 'tribe-events-calendar'), "RS" => __("Serbia", 'tribe-events-calendar'), "SC" => __("Seychelles", 'tribe-events-calendar'), "SL" => __("Sierra Leone", 'tribe-events-calendar'), "SG" => __("Singapore", 'tribe-events-calendar'), "SK" => __("Slovakia (Slovak Republic)", 'tribe-events-calendar'), "SI" => __("Slovenia", 'tribe-events-calendar'), "SB" => __("Solomon Islands", 'tribe-events-calendar'), "SO" => __("Somalia", 'tribe-events-calendar'), "ZA" => __("South Africa", 'tribe-events-calendar'), "GS" => __("South Georgia, South Sandwich Islands", 'tribe-events-calendar'), "ES" => __("Spain", 'tribe-events-calendar'), "LK" => __("Sri Lanka", 'tribe-events-calendar'), "SH" => __("St. Helena", 'tribe-events-calendar'), "PM" => __("St. Pierre And Miquelon", 'tribe-events-calendar'), "SD" => __("Sudan", 'tribe-events-calendar'), "SR" => __("Suriname", 'tribe-events-calendar'), "SJ" => __("Svalbard And Jan Mayen Islands", 'tribe-events-calendar'), "SZ" => __("Swaziland", 'tribe-events-calendar'), "SE" => __("Sweden", 'tribe-events-calendar'), "CH" => __("Switzerland", 'tribe-events-calendar'), "SY" => __("Syrian Arab Republic", 'tribe-events-calendar'), "TW" => __("Taiwan", 'tribe-events-calendar'), "TJ" => __("Tajikistan", 'tribe-events-calendar'), "TZ" => __("Tanzania, United Republic Of", 'tribe-events-calendar'), "TH" => __("Thailand", 'tribe-events-calendar'), "TG" => __("Togo", 'tribe-events-calendar'), "TK" => __("Tokelau", 'tribe-events-calendar'), "TO" => __("Tonga", 'tribe-events-calendar'), "TT" => __("Trinidad And Tobago", 'tribe-events-calendar'), "TN" => __("Tunisia", 'tribe-events-calendar'), "TR" => __("Turkey", 'tribe-events-calendar'), "TM" => __("Turkmenistan", 'tribe-events-calendar'), "TC" => __("Turks And Caicos Islands", 'tribe-events-calendar'), "TV" => __("Tuvalu", 'tribe-events-calendar'), "UG" => __("Uganda", 'tribe-events-calendar'), "UA" => __("Ukraine", 'tribe-events-calendar'), "AE" => __("United Arab Emirates", 'tribe-events-calendar'), "GB" => __("United Kingdom", 'tribe-events-calendar'), "UM" => __("United States Minor Outlying Islands", 'tribe-events-calendar'), "UY" => __("Uruguay", 'tribe-events-calendar'), "UZ" => __("Uzbekistan", 'tribe-events-calendar'), "VU" => __("Vanuatu", 'tribe-events-calendar'), "VE" => __("Venezuela", 'tribe-events-calendar'), "VN" => __("Viet Nam", 'tribe-events-calendar'), "VG" => __("Virgin Islands (British)", 'tribe-events-calendar'), "VI" => __("Virgin Islands (U.S.)", 'tribe-events-calendar'), "WF" => __("Wallis And Futuna Islands", 'tribe-events-calendar'), "EH" => __("Western Sahara", 'tribe-events-calendar'), "YE" => __("Yemen", 'tribe-events-calendar'), "ZM" => __("Zambia", 'tribe-events-calendar'), "ZW" => __("Zimbabwe", 'tribe-events-calendar')); } if ($postId || $useDefault) { $countryValue = get_post_meta($postId, '_EventCountry', true); if ($countryValue) { $defaultCountry = array(array_search($countryValue, $countries), $countryValue); } else { $defaultCountry = tribe_get_default_value('country'); } if ($defaultCountry && $defaultCountry[0] != "") { $selectCountry = array_shift($countries); asort($countries); $countries = array($defaultCountry[0] => __($defaultCountry[1], 'tribe-events-calendar')) + $countries; $countries = array("" => __($selectCountry, 'tribe-events-calendar')) + $countries; array_unique($countries); } return $countries; } else { return $countries; } }
/** * Get the countries being used and available for the plugin. * * @param string $postId The post ID. * @param bool $useDefault Should we use the defaults? * * @return array The countries array. */ public static function constructCountries($postId = '', $useDefault = true) { if (tribe_get_option('tribeEventsCountries') != '') { $countries = array('' => __('Select a Country:', 'tribe-events-calendar')); $country_rows = explode("\n", tribe_get_option('tribeEventsCountries')); foreach ($country_rows as $crow) { $country = explode(',', $crow); if (isset($country[0]) && isset($country[1])) { $country[0] = trim($country[0]); $country[1] = trim($country[1]); if ($country[0] && $country[1]) { $countries[$country[0]] = $country[1]; } } } } if (!isset($countries) || !is_array($countries) || count($countries) == 1) { $countries = array('' => __('Select a Country:', 'tribe-events-calendar'), 'US' => __('United States', 'tribe-events-calendar'), 'AF' => __('Afghanistan', 'tribe-events-calendar'), 'AL' => __('Albania', 'tribe-events-calendar'), 'DZ' => __('Algeria', 'tribe-events-calendar'), 'AS' => __('American Samoa', 'tribe-events-calendar'), 'AD' => __('Andorra', 'tribe-events-calendar'), 'AO' => __('Angola', 'tribe-events-calendar'), 'AI' => __('Anguilla', 'tribe-events-calendar'), 'AQ' => __('Antarctica', 'tribe-events-calendar'), 'AG' => __('Antigua And Barbuda', 'tribe-events-calendar'), 'AR' => __('Argentina', 'tribe-events-calendar'), 'AM' => __('Armenia', 'tribe-events-calendar'), 'AW' => __('Aruba', 'tribe-events-calendar'), 'AU' => __('Australia', 'tribe-events-calendar'), 'AT' => __('Austria', 'tribe-events-calendar'), 'AZ' => __('Azerbaijan', 'tribe-events-calendar'), 'BS' => __('Bahamas', 'tribe-events-calendar'), 'BH' => __('Bahrain', 'tribe-events-calendar'), 'BD' => __('Bangladesh', 'tribe-events-calendar'), 'BB' => __('Barbados', 'tribe-events-calendar'), 'BY' => __('Belarus', 'tribe-events-calendar'), 'BE' => __('Belgium', 'tribe-events-calendar'), 'BZ' => __('Belize', 'tribe-events-calendar'), 'BJ' => __('Benin', 'tribe-events-calendar'), 'BM' => __('Bermuda', 'tribe-events-calendar'), 'BT' => __('Bhutan', 'tribe-events-calendar'), 'BO' => __('Bolivia', 'tribe-events-calendar'), 'BA' => __('Bosnia And Herzegowina', 'tribe-events-calendar'), 'BW' => __('Botswana', 'tribe-events-calendar'), 'BV' => __('Bouvet Island', 'tribe-events-calendar'), 'BR' => __('Brazil', 'tribe-events-calendar'), 'IO' => __('British Indian Ocean Territory', 'tribe-events-calendar'), 'BN' => __('Brunei Darussalam', 'tribe-events-calendar'), 'BG' => __('Bulgaria', 'tribe-events-calendar'), 'BF' => __('Burkina Faso', 'tribe-events-calendar'), 'BI' => __('Burundi', 'tribe-events-calendar'), 'KH' => __('Cambodia', 'tribe-events-calendar'), 'CM' => __('Cameroon', 'tribe-events-calendar'), 'CA' => __('Canada', 'tribe-events-calendar'), 'CV' => __('Cape Verde', 'tribe-events-calendar'), 'KY' => __('Cayman Islands', 'tribe-events-calendar'), 'CF' => __('Central African Republic', 'tribe-events-calendar'), 'TD' => __('Chad', 'tribe-events-calendar'), 'CL' => __('Chile', 'tribe-events-calendar'), 'CN' => __('China', 'tribe-events-calendar'), 'CX' => __('Christmas Island', 'tribe-events-calendar'), 'CC' => __('Cocos (Keeling) Islands', 'tribe-events-calendar'), 'CO' => __('Colombia', 'tribe-events-calendar'), 'KM' => __('Comoros', 'tribe-events-calendar'), 'CG' => __('Congo', 'tribe-events-calendar'), 'CD' => __('Congo, The Democratic Republic Of The', 'tribe-events-calendar'), 'CK' => __('Cook Islands', 'tribe-events-calendar'), 'CR' => __('Costa Rica', 'tribe-events-calendar'), 'CI' => __("Cote D'Ivoire", 'tribe-events-calendar'), 'HR' => __('Croatia (Local Name: Hrvatska)', 'tribe-events-calendar'), 'CU' => __('Cuba', 'tribe-events-calendar'), 'CY' => __('Cyprus', 'tribe-events-calendar'), 'CZ' => __('Czech Republic', 'tribe-events-calendar'), 'DK' => __('Denmark', 'tribe-events-calendar'), 'DJ' => __('Djibouti', 'tribe-events-calendar'), 'DM' => __('Dominica', 'tribe-events-calendar'), 'DO' => __('Dominican Republic', 'tribe-events-calendar'), 'TP' => __('East Timor', 'tribe-events-calendar'), 'EC' => __('Ecuador', 'tribe-events-calendar'), 'EG' => __('Egypt', 'tribe-events-calendar'), 'SV' => __('El Salvador', 'tribe-events-calendar'), 'GQ' => __('Equatorial Guinea', 'tribe-events-calendar'), 'ER' => __('Eritrea', 'tribe-events-calendar'), 'EE' => __('Estonia', 'tribe-events-calendar'), 'ET' => __('Ethiopia', 'tribe-events-calendar'), 'FK' => __('Falkland Islands (Malvinas)', 'tribe-events-calendar'), 'FO' => __('Faroe Islands', 'tribe-events-calendar'), 'FJ' => __('Fiji', 'tribe-events-calendar'), 'FI' => __('Finland', 'tribe-events-calendar'), 'FR' => __('France', 'tribe-events-calendar'), 'FX' => __('France, Metropolitan', 'tribe-events-calendar'), 'GF' => __('French Guiana', 'tribe-events-calendar'), 'PF' => __('French Polynesia', 'tribe-events-calendar'), 'TF' => __('French Southern Territories', 'tribe-events-calendar'), 'GA' => __('Gabon', 'tribe-events-calendar'), 'GM' => __('Gambia', 'tribe-events-calendar'), 'GE' => __('Georgia', 'tribe-events-calendar'), 'DE' => __('Germany', 'tribe-events-calendar'), 'GH' => __('Ghana', 'tribe-events-calendar'), 'GI' => __('Gibraltar', 'tribe-events-calendar'), 'GR' => __('Greece', 'tribe-events-calendar'), 'GL' => __('Greenland', 'tribe-events-calendar'), 'GD' => __('Grenada', 'tribe-events-calendar'), 'GP' => __('Guadeloupe', 'tribe-events-calendar'), 'GU' => __('Guam', 'tribe-events-calendar'), 'GT' => __('Guatemala', 'tribe-events-calendar'), 'GN' => __('Guinea', 'tribe-events-calendar'), 'GW' => __('Guinea-Bissau', 'tribe-events-calendar'), 'GY' => __('Guyana', 'tribe-events-calendar'), 'HT' => __('Haiti', 'tribe-events-calendar'), 'HM' => __('Heard And Mc Donald Islands', 'tribe-events-calendar'), 'VA' => __('Holy See (Vatican City State)', 'tribe-events-calendar'), 'HN' => __('Honduras', 'tribe-events-calendar'), 'HK' => __('Hong Kong', 'tribe-events-calendar'), 'HU' => __('Hungary', 'tribe-events-calendar'), 'IS' => __('Iceland', 'tribe-events-calendar'), 'IN' => __('India', 'tribe-events-calendar'), 'ID' => __('Indonesia', 'tribe-events-calendar'), 'IR' => __('Iran (Islamic Republic Of)', 'tribe-events-calendar'), 'IQ' => __('Iraq', 'tribe-events-calendar'), 'IE' => __('Ireland', 'tribe-events-calendar'), 'IL' => __('Israel', 'tribe-events-calendar'), 'IT' => __('Italy', 'tribe-events-calendar'), 'JM' => __('Jamaica', 'tribe-events-calendar'), 'JP' => __('Japan', 'tribe-events-calendar'), 'JO' => __('Jordan', 'tribe-events-calendar'), 'KZ' => __('Kazakhstan', 'tribe-events-calendar'), 'KE' => __('Kenya', 'tribe-events-calendar'), 'KI' => __('Kiribati', 'tribe-events-calendar'), 'KP' => __("Korea, Democratic People's Republic Of", 'tribe-events-calendar'), 'KR' => __('Korea, Republic Of', 'tribe-events-calendar'), 'KW' => __('Kuwait', 'tribe-events-calendar'), 'KG' => __('Kyrgyzstan', 'tribe-events-calendar'), 'LA' => __("Lao People's Democratic Republic", 'tribe-events-calendar'), 'LV' => __('Latvia', 'tribe-events-calendar'), 'LB' => __('Lebanon', 'tribe-events-calendar'), 'LS' => __('Lesotho', 'tribe-events-calendar'), 'LR' => __('Liberia', 'tribe-events-calendar'), 'LY' => __('Libya', 'tribe-events-calendar'), 'LI' => __('Liechtenstein', 'tribe-events-calendar'), 'LT' => __('Lithuania', 'tribe-events-calendar'), 'LU' => __('Luxembourg', 'tribe-events-calendar'), 'MO' => __('Macau', 'tribe-events-calendar'), 'MK' => __('Macedonia', 'tribe-events-calendar'), 'MG' => __('Madagascar', 'tribe-events-calendar'), 'MW' => __('Malawi', 'tribe-events-calendar'), 'MY' => __('Malaysia', 'tribe-events-calendar'), 'MV' => __('Maldives', 'tribe-events-calendar'), 'ML' => __('Mali', 'tribe-events-calendar'), 'MT' => __('Malta', 'tribe-events-calendar'), 'MH' => __('Marshall Islands', 'tribe-events-calendar'), 'MQ' => __('Martinique', 'tribe-events-calendar'), 'MR' => __('Mauritania', 'tribe-events-calendar'), 'MU' => __('Mauritius', 'tribe-events-calendar'), 'YT' => __('Mayotte', 'tribe-events-calendar'), 'MX' => __('Mexico', 'tribe-events-calendar'), 'FM' => __('Micronesia, Federated States Of', 'tribe-events-calendar'), 'MD' => __('Moldova, Republic Of', 'tribe-events-calendar'), 'MC' => __('Monaco', 'tribe-events-calendar'), 'MN' => __('Mongolia', 'tribe-events-calendar'), 'ME' => __('Montenegro', 'tribe-events-calendar'), 'MS' => __('Montserrat', 'tribe-events-calendar'), 'MA' => __('Morocco', 'tribe-events-calendar'), 'MZ' => __('Mozambique', 'tribe-events-calendar'), 'MM' => __('Myanmar', 'tribe-events-calendar'), 'NA' => __('Namibia', 'tribe-events-calendar'), 'NR' => __('Nauru', 'tribe-events-calendar'), 'NP' => __('Nepal', 'tribe-events-calendar'), 'NL' => __('Netherlands', 'tribe-events-calendar'), 'AN' => __('Netherlands Antilles', 'tribe-events-calendar'), 'NC' => __('New Caledonia', 'tribe-events-calendar'), 'NZ' => __('New Zealand', 'tribe-events-calendar'), 'NI' => __('Nicaragua', 'tribe-events-calendar'), 'NE' => __('Niger', 'tribe-events-calendar'), 'NG' => __('Nigeria', 'tribe-events-calendar'), 'NU' => __('Niue', 'tribe-events-calendar'), 'NF' => __('Norfolk Island', 'tribe-events-calendar'), 'MP' => __('Northern Mariana Islands', 'tribe-events-calendar'), 'NO' => __('Norway', 'tribe-events-calendar'), 'OM' => __('Oman', 'tribe-events-calendar'), 'PK' => __('Pakistan', 'tribe-events-calendar'), 'PW' => __('Palau', 'tribe-events-calendar'), 'PA' => __('Panama', 'tribe-events-calendar'), 'PG' => __('Papua New Guinea', 'tribe-events-calendar'), 'PY' => __('Paraguay', 'tribe-events-calendar'), 'PE' => __('Peru', 'tribe-events-calendar'), 'PH' => __('Philippines', 'tribe-events-calendar'), 'PN' => __('Pitcairn', 'tribe-events-calendar'), 'PL' => __('Poland', 'tribe-events-calendar'), 'PT' => __('Portugal', 'tribe-events-calendar'), 'PR' => __('Puerto Rico', 'tribe-events-calendar'), 'QA' => __('Qatar', 'tribe-events-calendar'), 'RE' => __('Reunion', 'tribe-events-calendar'), 'RO' => __('Romania', 'tribe-events-calendar'), 'RU' => __('Russian Federation', 'tribe-events-calendar'), 'RW' => __('Rwanda', 'tribe-events-calendar'), 'KN' => __('Saint Kitts And Nevis', 'tribe-events-calendar'), 'LC' => __('Saint Lucia', 'tribe-events-calendar'), 'VC' => __('Saint Vincent And The Grenadines', 'tribe-events-calendar'), 'WS' => __('Samoa', 'tribe-events-calendar'), 'SM' => __('San Marino', 'tribe-events-calendar'), 'ST' => __('Sao Tome And Principe', 'tribe-events-calendar'), 'SA' => __('Saudi Arabia', 'tribe-events-calendar'), 'SN' => __('Senegal', 'tribe-events-calendar'), 'RS' => __('Serbia', 'tribe-events-calendar'), 'SC' => __('Seychelles', 'tribe-events-calendar'), 'SL' => __('Sierra Leone', 'tribe-events-calendar'), 'SG' => __('Singapore', 'tribe-events-calendar'), 'SK' => __('Slovakia (Slovak Republic)', 'tribe-events-calendar'), 'SI' => __('Slovenia', 'tribe-events-calendar'), 'SB' => __('Solomon Islands', 'tribe-events-calendar'), 'SO' => __('Somalia', 'tribe-events-calendar'), 'ZA' => __('South Africa', 'tribe-events-calendar'), 'GS' => __('South Georgia, South Sandwich Islands', 'tribe-events-calendar'), 'ES' => __('Spain', 'tribe-events-calendar'), 'LK' => __('Sri Lanka', 'tribe-events-calendar'), 'SH' => __('St. Helena', 'tribe-events-calendar'), 'PM' => __('St. Pierre And Miquelon', 'tribe-events-calendar'), 'SD' => __('Sudan', 'tribe-events-calendar'), 'SR' => __('Suriname', 'tribe-events-calendar'), 'SJ' => __('Svalbard And Jan Mayen Islands', 'tribe-events-calendar'), 'SZ' => __('Swaziland', 'tribe-events-calendar'), 'SE' => __('Sweden', 'tribe-events-calendar'), 'CH' => __('Switzerland', 'tribe-events-calendar'), 'SY' => __('Syrian Arab Republic', 'tribe-events-calendar'), 'TW' => __('Taiwan', 'tribe-events-calendar'), 'TJ' => __('Tajikistan', 'tribe-events-calendar'), 'TZ' => __('Tanzania, United Republic Of', 'tribe-events-calendar'), 'TH' => __('Thailand', 'tribe-events-calendar'), 'TG' => __('Togo', 'tribe-events-calendar'), 'TK' => __('Tokelau', 'tribe-events-calendar'), 'TO' => __('Tonga', 'tribe-events-calendar'), 'TT' => __('Trinidad And Tobago', 'tribe-events-calendar'), 'TN' => __('Tunisia', 'tribe-events-calendar'), 'TR' => __('Turkey', 'tribe-events-calendar'), 'TM' => __('Turkmenistan', 'tribe-events-calendar'), 'TC' => __('Turks And Caicos Islands', 'tribe-events-calendar'), 'TV' => __('Tuvalu', 'tribe-events-calendar'), 'UG' => __('Uganda', 'tribe-events-calendar'), 'UA' => __('Ukraine', 'tribe-events-calendar'), 'AE' => __('United Arab Emirates', 'tribe-events-calendar'), 'GB' => __('United Kingdom', 'tribe-events-calendar'), 'UM' => __('United States Minor Outlying Islands', 'tribe-events-calendar'), 'UY' => __('Uruguay', 'tribe-events-calendar'), 'UZ' => __('Uzbekistan', 'tribe-events-calendar'), 'VU' => __('Vanuatu', 'tribe-events-calendar'), 'VE' => __('Venezuela', 'tribe-events-calendar'), 'VN' => __('Viet Nam', 'tribe-events-calendar'), 'VG' => __('Virgin Islands (British)', 'tribe-events-calendar'), 'VI' => __('Virgin Islands (U.S.)', 'tribe-events-calendar'), 'WF' => __('Wallis And Futuna Islands', 'tribe-events-calendar'), 'EH' => __('Western Sahara', 'tribe-events-calendar'), 'YE' => __('Yemen', 'tribe-events-calendar'), 'ZM' => __('Zambia', 'tribe-events-calendar'), 'ZW' => __('Zimbabwe', 'tribe-events-calendar')); } if ($postId || $useDefault) { $countryValue = get_post_meta($postId, '_EventCountry', true); if ($countryValue) { $defaultCountry = array(array_search($countryValue, $countries), $countryValue); } else { $defaultCountry = tribe_get_default_value('country'); } if ($defaultCountry && $defaultCountry[0] != '') { $selectCountry = array_shift($countries); asort($countries); $countries = array($defaultCountry[0] => __($defaultCountry[1], 'tribe-events-calendar')) + $countries; $countries = array('' => __($selectCountry, 'tribe-events-calendar')) + $countries; array_unique($countries); } return $countries; } else { return $countries; } }
echo '<option value="' . esc_attr($fullname) . '" '; selected($current == $fullname); echo '>' . esc_html($fullname) . '</option>'; } } ?> </select> </td> </tr> <tr class="venue"> <?php if (!isset($_VenueStateProvince) || $_VenueStateProvince == '') { $_VenueStateProvince = -1; } $currentState = $_VenueStateProvince == -1 ? tribe_get_default_value('state') : $_VenueStateProvince; $currentProvince = empty($_VenueProvince) ? tribe_get_default_value('province') : $_VenueProvince; ?> <td class='tribe-table-field-label'><?php esc_html_e('State or Province:', 'the-events-calendar'); ?> </td> <td> <input tabindex="<?php tribe_events_tab_index(); ?> " id="StateProvinceText" name="venue[Province]" type='text' name='' size='25' value='<?php echo esc_attr($currentProvince); ?> ' /> <select class="chosen" tabindex="<?php tribe_events_tab_index();