You are here

function template_preprocess_getlocations_fields_distance in Get Locations 7

Same name and namespace in other branches
  1. 7.2 modules/getlocations_fields/getlocations_fields.module \template_preprocess_getlocations_fields_distance()

Theme preprocess function for getlocations_fields_distance.

File

modules/getlocations_fields/getlocations_fields.module, line 4967
getlocations_fields.module @author Bob Hutchinson http://drupal.org/user/52366 @copyright GNU GPL

Code

function template_preprocess_getlocations_fields_distance(&$variables) {
  $units = $variables['units'];
  unset($variables['units']);
  $variables['shortunit'] = $units;
  $variables['longunit'] = getlocations_get_unit_names($units, 'plurals');
  $variables['distance'] = (double) $variables['distance'];
}