You are here

function _themekey_properties_submit in ThemeKey 6

Function _themekey_properties_submit().

File

./themekey_admin.inc, line 222

Code

function _themekey_properties_submit($form, &$form_state) {
  if (isset($form_state['values']['table'])) {
    foreach ($form_state['values']['table'] as $id => $item) {
      if (empty($item['value'])) {
        _themekey_properties_del($id);
      }
      else {
        $item['id'] = $id;
        _themekey_properties_set($item);
      }
    }
  }

  //
  if (!empty($form_state['values']['addtable']['add']['value'])) {
    _themekey_properties_set($form_state['values']['addtable']['add']);
  }
  drupal_set_message(t('The configuration options have been saved.'));
}