function color_form_system_theme_settings_alter

7.x color.module color_form_system_theme_settings_alter(&$form, &$form_state)

Implements hook_form_FORM_ID_alter().

File

drupal-7.x/modules/color/color.module, line 39
Allows users to change the color scheme of themes.

Code

function color_form_system_theme_settings_alter(&$form, &$form_state) {
  if (isset($form_state['build_info']['args'][0]) && ($theme = $form_state['build_info']['args'][0]) && color_get_info($theme) && function_exists('gd_info')) {
    $form['color'] = array(
      '#type' => 'fieldset',
      '#title' => t('Color scheme'),
      '#weight' => -1,
      '#attributes' => array('id' => 'color_scheme_form'),
      '#theme' => 'color_scheme_form',
    );
    $form['color'] += color_scheme_form($form, $form_state, $theme);
    $form['#validate'][] = 'color_scheme_form_validate';
    $form['#submit'][] = 'color_scheme_form_submit';
  }
}