You are here

function designkit_form_system_theme_settings_alter in DesignKit 7

Same name and namespace in other branches
  1. 6 designkit.module \designkit_form_system_theme_settings_alter()

Theme integration. Implementation of hook_form_alter() for system_theme_settings.

File

./designkit.module, line 253

Code

function designkit_form_system_theme_settings_alter(&$form, &$form_state) {
  module_load_include('inc', 'designkit', 'designkit.admin');
  _designkit_form_alter($form, $form_state);

  // yank logo if DesignKit will provide one with the same key.
  $form['logo']['#access'] = !isset($form['designkit_image']['logo']);

  // cutom validation to handle copying of the logo to the default theme logo fields.
  array_unshift($form['#validate'], '_designkit_system_theme_settings_validate_pre');
  $form['#validate'][] = '_designkit_system_theme_settings_validate_post';

  // system_theme_settings form requires an additional submit handler.
  $form['#submit'][] = '_designkit_system_theme_settings_submit';
}