You are here

function themekey_ui_settings_form_submit in ThemeKey 7.3

Same name and namespace in other branches
  1. 6.4 themekey_ui_admin.inc \themekey_ui_settings_form_submit()
  2. 6.2 themekey_ui_admin.inc \themekey_ui_settings_form_submit()
  3. 6.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 137

Code

function themekey_ui_settings_form_submit($form, &$form_state) {

  //
  foreach ($form_state['values'] as $key => $value) {
    if (0 === strpos($key, 'themekey_ui_')) {
      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:author_triggers_theme', $form_state['values']['themekey_ui_author']);
  themekey_update_static_rule('themekey_ui:blog_author_triggers_theme', array_key_exists('themekey_ui_blog_author', $form_state['values']) ? $form_state['values']['themekey_ui_blog_author'] : FALSE);
  drupal_set_message(t('The configuration options have been saved.'));
}