You are here

function units_get_enabled_units in Units of Measurement 6

Return array of short names of enabled units.

Empty array means "all units enabled".

2 calls to units_get_enabled_units()
units_admin_settings in ./units.admin.inc
Units configuration form
units_unit_is_enabled in ./units.module
Check if provided unit is enabled.

File

./units.module, line 57
Units module.

Code

function units_get_enabled_units() {
  static $enabled_units;
  if (!isset($enabled_units)) {
    $enabled_units = variable_get('units_enabled_units', array());
  }
  return $enabled_units;
}