seven-1.0.0-alpha1/theme-settings.php
theme-settings.php
<?php
/**
* @file
* Functions to support Seven theme settings.
*/
// phpcs:disable Drupal.Commenting.DocComment.ContentAfterOpen
/* @noinspection PhpParameterByRefIsNotUsedAsReferenceInspection, PhpUnusedParameterInspection, PhpUnused */
declare(strict_types=1);
// phpcs:enable
use Drupal\Core\Form\FormStateInterface;
/**
* Implements hook_form_FORM_ID_alter() for system_theme_settings.
*/
function seven_form_system_theme_settings_alter(&$form, FormStateInterface $form_state): void {
$form['seven_settings'] = [
'#type' => 'fieldset',
'#title' => t('Seven utilities'),
];
$form['seven_settings']['enable_block_contextual_links'] = [
'#type' => 'checkbox',
'#title' => t('Enable contextual links for blocks'),
'#default_value' => theme_get_setting('enable_block_contextual_links'),
];
}
