You are here

function countries_countries_alter in Countries 8

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

Implements hook_countries_alter().

Currently the only usage in core is in system module when setting the sites default country.

Caution: Results are not sanitized.

1 string reference to 'countries_countries_alter'
countries_clear_caches in ./countries.module
Helper function to clear various caches.

File

./countries.module, line 164
Defines the field and entity information for countries.

Code

function countries_countries_alter(&$countries) {
  $enabled_countries =& drupal_static(__FUNCTION__, array());
  if (empty($enabled_countries)) {
    $enabled_countries = countries_get_countries('name', array(
      'enabled' => COUNTRIES_ENABLED,
    ), array(
      'sanitize' => FALSE,
    ));
  }
  $countries = $enabled_countries;
}