function search_api_location_get_units in Search API Location 7.2
Same name and namespace in other branches
- 8 search_api_location.module \search_api_location_get_units()
Returns an array of options for used distance units.
3 calls to search_api_location_get_units()
- search_api_location_page_form_search_api_page_admin_add_alter in search_api_location_page/
search_api_location_page.module - Implements hook_form_FORM_ID_alter().
- search_api_location_page_form_search_api_page_admin_edit_alter in search_api_location_page/
search_api_location_page.module - Implements hook_form_FORM_ID_alter().
- search_api_location_page_form_search_api_page_search_form_alter in search_api_location_page/
search_api_location_page.module - Implements hook_form_FORM_ID_alter().
File
- ./
search_api_location.module, line 55 - Provides location based search functionality for the Search API.
Code
function search_api_location_get_units() {
$units =& drupal_static(__FUNCTION__);
if (!isset($units)) {
$units = array(
'1' => t('Kilometers'),
'1.60935' => t('Miles'),
);
drupal_alter('search_api_location_units', $units);
}
return $units;
}