You are here

function country_get_predefined_list in Smart IP 7.2

Same name and namespace in other branches
  1. 8.4 includes/smart_ip.country_list.inc \country_get_predefined_list()
  2. 8.2 includes/smart_ip.country_list.inc \country_get_predefined_list()
  3. 8.3 includes/smart_ip.country_list.inc \country_get_predefined_list()
  4. 6.2 includes/smart_ip.country_list.inc \country_get_predefined_list()
  5. 6 includes/smart_ip.country_list.inc \country_get_predefined_list()

Get an array of all country code => country name pairs.

Get an array of all country code => country name pairs as laid out in ISO 3166-1 alpha-2.

Return value

An array of all country code => country name pairs.

2 calls to country_get_predefined_list()
smart_ip_get_location in ./smart_ip.module
Get the geo location from the IP address
user_location_fallback in ./smart_ip.module
Use server's mod_geoip, X-GeoIP and Cloudflare IP Geolocation as fallback if the user's geolocation is empty

File

includes/smart_ip.country_list.inc, line 16
Provides a list of countries based on ISO standards.

Code

function country_get_predefined_list() {
  include_once DRUPAL_ROOT . '/includes/locale.inc';
  $countries = country_get_list();

  // Allow other modules to modify country list via hook_smart_ip_country_predefined_list_alter()
  drupal_alter('smart_ip_country_predefined_list', $countries);
  return $countries;
}