You are here

function hook_search_api_location_units_alter in Search API Location 7.2

Alter the possible units offered by the Search API location module.

Parameters

array $units: An array of units, where the keys are the conversion factors to kilometers and the values are the unit names.

1 invocation of hook_search_api_location_units_alter()
search_api_location_get_units in ./search_api_location.module
Returns an array of options for used distance units.

File

./search_api_location.api.php, line 53
Hooks provided by the Search API location module.

Code

function hook_search_api_location_units_alter(array &$units) {
  $units = array(
    '1' => t('Kilometers'),
    '0.001' => t('Meters'),
    '0.0000254' => t('Inches'),
  );
}