You are here

function habitat_ui_settings_module_values in Habitat 7

Prepare submit module values for saving.

1 call to habitat_ui_settings_module_values()
habitat_ui_settings_submit in habitat_ui/habitat_ui.module

File

habitat_ui/habitat_ui.module, line 104
User Interface for Habitat.

Code

function habitat_ui_settings_module_values($values, $type) {
  if (!empty($values[$type])) {
    $values[$type] = explode("\n", $values[$type]);
    foreach ($values[$type] as &$module) {
      $module = trim($module);
    }
  }
  else {
    $values[$type] = array();
  }
  return $values;
}