You are here

function theme_getlocations_fields_distance in Get Locations 7

Same name and namespace in other branches
  1. 7.2 modules/getlocations_fields/getlocations_fields.module \theme_getlocations_fields_distance()
1 theme call to theme_getlocations_fields_distance()
getlocations_fields_handler_field_distance::render in modules/getlocations_fields/handlers/getlocations_fields_handler_field_distance.inc
Render the field.

File

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

Code

function theme_getlocations_fields_distance($variables) {
  $distance = $variables['distance'];
  $shortunit = $variables['shortunit'];

  // also available
  // $longunit = $variables['longunit'];
  $output = '';
  $output .= number_format($distance, 2) . ' ' . $shortunit;
  return $output;
}