-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy paththeme-settings.php
21 lines (20 loc) · 1.03 KB
/
theme-settings.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<?php
/**
* Implements hook_form_system_theme_settings_alter() function.
*/
function zen_form_system_theme_settings_alter(&$form, \Drupal\Core\Form\FormStateInterface &$form_state, $form_id = NULL) {
// Work-around for a core bug affecting admin themes. See issue #943212.
if (isset($form_id)) {
return;
}
$form['themedev'] = array(
'#type' => 'fieldset',
'#title' => t('Theme development settings'),
);
$form['themedev']['zen_rebuild_registry'] = array(
'#type' => 'checkbox',
'#title' => t('Rebuild theme registry and output template debugging on every page.'),
'#default_value' => theme_get_setting('zen_rebuild_registry'),
'#description' => t('During theme development, it can be very useful to continuously <a href="!link">rebuild the theme registry</a> and to output template debugging HTML comments. WARNING: this is a huge performance penalty and must be turned off on production websites.', array('!link' => 'https://drupal.org/node/173880#theme-registry')),
);
}