-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy paththeme-settings.php
More file actions
23 lines (22 loc) · 1021 Bytes
/
theme-settings.php
File metadata and controls
23 lines (22 loc) · 1021 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<?php
/**
* Implements hook_form_system_theme_settings_alter() function.
*
* @param $form
* Nested array of form elements that comprise the form.
* @param $form_state
* A keyed array containing the current state of the form.
*/
function voltron_form_system_theme_settings_alter(&$form, $form_state, $form_id = NULL) {
// Work-around for a core bug affecting admin themes. See issue #943212.
if (isset($form_id)) {
return;
}
// Create the form using Forms API
$form['themedev']['voltron_rebuild_registry'] = array(
'#type' => 'checkbox',
'#title' => t('Rebuild theme registry on every page.'),
'#default_value' => theme_get_setting('voltron_rebuild_registry'),
'#description' => t('During theme development, it can be very useful to continuously <a href="!link">rebuild the theme registry</a>. WARNING: this is a huge performance penalty and must be turned off on production websites.', array('!link' => 'http://drupal.org/node/173880#theme-registry')),
);
}