function _addressfield_tokens_countries in Addressfield Tokens 7
Gets the list of countries from the locale settings in Drupal.
Return value
array An array of countries. The keys are the 2-letter abbreviations and the values are the full country names.
3 calls to _addressfield_tokens_countries()
- addressfield_tokens_admin_form in ./
addressfield_tokens.admin.inc - Provides a form for configuring regional options for addresses.
- _addressfield_tokens_country in ./
addressfield_tokens.module - Gets the name of the country with the given abbreviation.
- _addressfield_tokens_country_abbr in ./
addressfield_tokens.module - Gets the abbreviation of the country with the given name.
File
- ./
addressfield_tokens.module, line 297 - Main components.
Code
function _addressfield_tokens_countries() {
$countries =& drupal_static(__FUNCTION__);
if (empty($countries)) {
require_once DRUPAL_ROOT . '/includes/locale.inc';
$countries = country_get_list();
}
return $countries;
}