You are here

function content_theme_admin_content_type_submit in Content Theme 6

Same name and namespace in other branches
  1. 7.2 content_theme.admin.inc \content_theme_admin_content_type_submit()
  2. 7 content_theme.admin.inc \content_theme_admin_content_type_submit()

File

./content_theme.admin.inc, line 278
Admin page callbacks for the content_theme module.

Code

function content_theme_admin_content_type_submit($form, &$form_state) {
  $edit_theme = $form_state['values']['content_theme_edit'];
  $view_theme = $form_state['values']['content_theme_view'];
  foreach ($form_state['values']['types_select'] as $type) {
    if (!empty($type)) {
      variable_set('content_theme_content_type_edit_' . $type, $edit_theme);
      variable_set('content_theme_content_type_view_' . $type, $view_theme);
    }
  }
  drupal_set_message(t('The themes have been updated.'));
}