forked from mkalkbrenner/themekey
-
Notifications
You must be signed in to change notification settings - Fork 0
/
themekey_debug_admin.inc
55 lines (47 loc) · 1.89 KB
/
themekey_debug_admin.inc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<?php
/**
* @file
* provides a debug mode for module ThemeKey.
* @see themekey.module
*
* @author Markus Kalkbrenner | Cocomore AG
* @see http://drupal.org/user/124705
*/
/**
* Form builder for the form to enable ThemeKey debug mode.
*
* @ingroup forms
*/
function themekey_debug_settings_form() {
$form = array();
$form['themekey_debug'] = array(
'#type' => 'fieldset',
'#title' => t('Debug Settings'),
'#collapsible' => FALSE,
'#collapsed' => FALSE,
'#description' => t("Debug information will only be visible for site's administrator."),
);
$form['themekey_debug']['themekey_debug_show_property_values'] = array(
'#type' => 'checkbox',
'#title' => t('Show ThemeKey properties values'),
'#default_value' => variable_get('themekey_debug_show_property_values', FALSE),
'#description' => t('Shows current values of ThemeKey properties at the bottom of every page. Additionally you can start creating a corresponding Theme Switching Rule by clicking on a value.'),
);
$form['themekey_debug']['themekey_debug_trace_rule_switching'] = array(
'#type' => 'checkbox',
'#title' => t('Trace ThemeKey rule switching'),
'#default_value' => variable_get('themekey_debug_trace_rule_switching', FALSE),
'#description' => t('Prints out detailed information about matching or non matching rules.'),
);
$form['themekey_debug']['themekey_debug_non_admin_users'] = array(
'#type' => 'checkbox',
'#title' => t('Show debug information to non admin users'),
'#default_value' => variable_get('themekey_debug_non_admin_users', FALSE),
'#description' => t('All debug output will be shown to all users including anonymous users. Be carefull in production environments and turn off page caching first!'),
);
$form['buttons']['submit'] = array(
'#type' => 'submit',
'#value' => t('Save configuration'),
);
return system_settings_form($form);
}