You are here

function countries_get_continents in Countries 7

Same name and namespace in other branches
  1. 8 countries.module \countries_get_continents()
  2. 7.2 countries.module \countries_get_continents()

Get all continents.

Return value

An array of (continent code, continent name) pairs.

4 calls to countries_get_continents()
countries_admin_form in ./countries.admin.inc
Generate a country form.
countries_admin_overview in ./countries.admin.inc
Menu callback; Displays a list of all countries.
countries_field_widget_settings_form in ./countries.module
Implement hook_field_widget_settings_form().
countries_tokens in ./countries.tokens.inc
Implements hook_tokens().

File

./countries.module, line 185

Code

function countries_get_continents() {
  $continents =& drupal_static(__FUNCTION__, array());
  if (empty($continents)) {
    $continents = variable_get('countries_continents', countries_get_default_continents());

    // TODO: I18n
    //    if (module_exists('i18nstrings')) {
    //      foreach ($continents as $code => $continent) {
    //        $continents[$code] = countries_localize("countries:continent-{$code}:name", $continent);
    //      }
    //    }
  }
  return $continents;
}