theme-settings.php 1.1 KB

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. /**
  3. * @file
  4. * Functions to support Rorschach theme settings.
  5. */
  6. use Drupal\Core\Form\FormStateInterface;
  7. /**
  8. * Implements hook_form_FORM_ID_alter() for system_theme_settings.
  9. */
  10. function rorschach_form_system_theme_settings_alter(&$form, FormStateInterface $form_state) {
  11. $form['rorschach_settings']['rorschach_utilities'] = [
  12. '#type' => 'fieldset',
  13. '#title' => t('Rorschach Utilities'),
  14. ];
  15. $form['rorschach_settings']['rorschach_utilities']['mobile_menu_all_widths'] = [
  16. '#type' => 'checkbox',
  17. '#title' => t('Enable mobile menu at all widths'),
  18. '#default_value' => theme_get_setting('mobile_menu_all_widths'),
  19. '#description' => t('Enables the mobile menu toggle at all widths.'),
  20. ];
  21. $form['rorschach_settings']['rorschach_utilities']['site_branding_bg_color'] = [
  22. '#type' => 'select',
  23. '#title' => t('Header site branding background color'),
  24. '#options' => [
  25. 'default' => t('Primary Branding Color'),
  26. 'gray' => t('Gray'),
  27. 'white' => t('White'),
  28. ],
  29. '#default_value' => theme_get_setting('site_branding_bg_color'),
  30. ];
  31. }