You are here

function content_theme_admin_content_type_submit in Content Theme 7

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

File

./content_theme.admin.inc, line 242
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'] as $type) {
    if (!empty($type)) {
      if ($edit_theme != '-no_update-') {
        variable_set('content_theme_content_type_edit_' . $type, $edit_theme);
      }
      if ($view_theme != '-no_update-') {
        variable_set('content_theme_content_type_view_' . $type, $view_theme);
      }
    }
  }
  drupal_set_message(t('The themes have been updated.'));
}