You are here

function hook_addressfield_administrative_areas_alter in Address Field 7

Allows modules to alter the predefined administrative areas.

Parameters

$administrative_areas: The array of all predefined administrative areas.

See also

addressfield_get_administrative_areas()

1 invocation of hook_addressfield_administrative_areas_alter()
addressfield_get_administrative_areas in ./addressfield.administrative_areas.inc
Returns the predefined administrative areas.

File

./addressfield.api.php, line 86
API documentation for Addressfield.

Code

function hook_addressfield_administrative_areas_alter(&$administrative_areas) {

  // Alter the label of the Spanish administrative area with the iso code PM.
  $administrative_areas['ES']['PM'] = t('Balears / Baleares');

  // Add administrative areas for imaginary country XT, keyed by their
  // imaginary ISO codes.
  $administrative_areas['XT'] = array(
    'A' => t('Aland'),
    'B' => t('Bland'),
  );
}