You are here

function test_theme_form_system_theme_settings_alter in Drupal 7

Implements hook_form_FORM_ID_alter().

File

modules/simpletest/tests/themes/test_theme/theme-settings.php, line 11
Theme setting callbacks for the test_theme theme.

Code

function test_theme_form_system_theme_settings_alter(&$form, &$form_state) {
  $form['test_theme_checkbox'] = array(
    '#type' => 'checkbox',
    '#title' => 'Test theme checkbox',
    '#default_value' => theme_get_setting('test_theme_checkbox'),
  );

  // Force the form to be cached so we can test that this file is properly
  // loaded and the custom submit handler is properly called even on a cached
  // form build.
  $form_state['cache'] = TRUE;
  $form['#submit'][] = 'test_theme_form_system_theme_settings_submit';
}