Tribe__Languages__Locations::get_country_based_on_code( string $country_code )
Get a country name based on a country code.
Contents
Parameters
- $country_code
-
(string) (Required) A 2-digit country code.
Return
(string) The full country name.
Source
File: src/Tribe/Languages/Locations.php
public function get_country_based_on_code( $country_code ) {
// Get the country code of the venue.
$country_code = strtoupper( $country_code );
// Get the country array from Tribe Common.
$countries = $this->get_countries();
return $countries[ $country_code ] ?? $country_code;
}
Changelog
| Version | Description |
|---|---|
| 5.2.1 | Introduced. |