1.12.x color.legacy.inc bartik_form_system_theme_settings_alter_submit($form, &$form_state)
1.10.x color.legacy.inc bartik_form_system_theme_settings_alter_submit($form, &$form_state)
1.11.x color.legacy.inc bartik_form_system_theme_settings_alter_submit($form, &$form_state)
1.7.x color.legacy.inc bartik_form_system_theme_settings_alter_submit($form, &$form_state)

Submit handler for theme settings form.

Deprecated

since 1.3.0

File

modules/color/color.legacy.inc, line 37
Contains support for legacy Bartik Blue Lagoon colors.

Code

function bartik_form_system_theme_settings_alter_submit($form, &$form_state) {
  // If still using the legacy palette, don't save a custom color scheme.
  $legacy_palette = $form['color']['info']['#value']['schemes']['blue_lagoon']['colors'];
  if ($legacy_palette == $form_state['values']['palette']) {
    // Removing "info" will prevent Color module from making a new stylesheet.
    unset($form_state['values']['info']);
    unset($form_state['values']['scheme']);
    unset($form_state['values']['palette']);
    // Set the legacy flag in the bartik.settings config file.
    $form_state['values']['color_legacy'] = TRUE;
  }
  else {
    $form_state['values']['color_legacy'] = FALSE;
  }
}