You are here

function themekey_ui_settings_form_submit in ThemeKey 6.4

Same name and namespace in other branches
  1. 6.2 themekey_ui_admin.inc \themekey_ui_settings_form_submit()
  2. 6.3 themekey_ui_admin.inc \themekey_ui_settings_form_submit()
  3. 7.3 themekey_ui_admin.inc \themekey_ui_settings_form_submit()
  4. 7 themekey_ui_admin.inc \themekey_ui_settings_form_submit()
  5. 7.2 themekey_ui_admin.inc \themekey_ui_settings_form_submit()

Form submission handler for themekey_ui_settings_form().

See also

themekey_ui_settings_form()

File

./themekey_ui_admin.inc, line 92

Code

function themekey_ui_settings_form_submit($form, &$form_state) {

  //
  foreach ($form_state['values'] as $key => $value) {
    $pos = strpos($key, 'themekey_ui_');
    if ($pos !== FALSE && $pos == 0) {
      variable_set($key, $value);
    }
  }
  themekey_update_static_rule('themekey_ui:node_triggers_theme', $form_state['values']['themekey_ui_nodeform']);
  themekey_update_static_rule('themekey_ui:node_author_triggers_theme', $form_state['values']['themekey_ui_author']);
  drupal_set_message(t('The configuration options have been saved.'));
}