You are here

function units_default_default_units_unit in Units of Measurement 7

Same name and namespace in other branches
  1. 7.2 units_default/units_default.module \units_default_default_units_unit()

Implements hook_default_units_unit().

File

units_default/units_default.module, line 52
Create common units and measures such as length, volume, weight, etc.

Code

function units_default_default_units_unit() {
  $settings = units_default_enabled();
  $enabled_units = array();
  foreach ($settings as $v) {
    $enabled_units += $v['units'];
  }
  $items = array_intersect_key(_units_default_default_units_unit(), $enabled_units);
  return $items;
}