-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy paththeme-settings.php
More file actions
98 lines (94 loc) · 4.44 KB
/
Copy paththeme-settings.php
File metadata and controls
98 lines (94 loc) · 4.44 KB
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
<?php
// Form override fo theme settings
function basic_form_system_theme_settings_alter(&$form, $form_state) {
$form['options_settings'] = array(
'#type' => 'fieldset',
'#title' => t('Theme Specific Settings'),
'#collapsible' => FALSE,
'#collapsed' => FALSE
);
$form['options_settings']['basic_tabs'] = array(
'#type' => 'checkbox',
'#title' => t('Use the ZEN tabs'),
'#description' => t('Check this if you wish to replace the default tabs by the ZEN tabs'),
'#default_value' => theme_get_setting('basic_tabs'),
);
$form['options_settings']['basic_breadcrumb'] = array(
'#type' => 'fieldset',
'#title' => t('Breadcrumb settings'),
'#attributes' => array('id' => 'basic-breadcrumb'),
);
$form['options_settings']['basic_breadcrumb']['basic_breadcrumb'] = array(
'#type' => 'select',
'#title' => t('Display breadcrumb'),
'#default_value' => theme_get_setting('basic_breadcrumb'),
'#options' => array(
'yes' => t('Yes'),
'admin' => t('Only in admin section'),
'no' => t('No'),
),
);
$form['options_settings']['basic_breadcrumb']['basic_breadcrumb_separator'] = array(
'#type' => 'textfield',
'#title' => t('Breadcrumb separator'),
'#description' => t('Text only. Don’t forget to include spaces.'),
'#default_value' => theme_get_setting('basic_breadcrumb_separator'),
'#size' => 5,
'#maxlength' => 10,
'#prefix' => '<div id="div-basic-breadcrumb-collapse">', // jquery hook to show/hide optional widgets
);
$form['options_settings']['basic_breadcrumb']['basic_breadcrumb_home'] = array(
'#type' => 'checkbox',
'#title' => t('Show home page link in breadcrumb'),
'#default_value' => theme_get_setting('basic_breadcrumb_home'),
);
$form['options_settings']['basic_breadcrumb']['basic_breadcrumb_trailing'] = array(
'#type' => 'checkbox',
'#title' => t('Append a separator to the end of the breadcrumb'),
'#default_value' => theme_get_setting('basic_breadcrumb_trailing'),
'#description' => t('Useful when the breadcrumb is placed just before the title.'),
);
$form['options_settings']['basic_breadcrumb']['basic_breadcrumb_title'] = array(
'#type' => 'checkbox',
'#title' => t('Append the content title to the end of the breadcrumb'),
'#default_value' => theme_get_setting('basic_breadcrumb_title'),
'#description' => t('Useful when the breadcrumb is not placed just before the title.'),
'#suffix' => '</div>', // #div-basic-breadcrumb-collapse"
);
//IE specific settings.
$form['options_settings']['basic_ie'] = array(
'#type' => 'fieldset',
'#title' => t('Internet Explorer Stylesheets'),
'#attributes' => array('id' => 'basic-ie'),
);
$form['options_settings']['basic_ie']['basic_ie_enabled'] = array(
'#type' => 'checkbox',
'#title' => t('Enable Internet Explorer stylesheets in theme'),
'#default_value' => theme_get_setting('basic_ie_enabled'),
'#description' => t('If you check this box you can choose which IE stylesheets in theme get rendered on display.'),
);
$form['options_settings']['basic_ie']['basic_ie_enabled_css'] = array(
'#type' => 'fieldset',
'#title' => t('Check which IE versions you want to enable additional .css stylesheets for.'),
'#states' => array(
'visible' => array(
':input[name="basic_ie_enabled"]' => array('checked' => TRUE),
),
),
);
$form['options_settings']['basic_ie']['basic_ie_enabled_css']['basic_ie_enabled_versions'] = array(
'#type' => 'checkboxes',
'#options' => array(
'ie8' => t('Internet Explorer 8'),
'ie9' => t('Internet Explorer 9'),
'ie10' => t('Internet Explorer 10'),
),
'#default_value' => theme_get_setting('basic_ie_enabled_versions'),
);
$form['options_settings']['clear_registry'] = array(
'#type' => 'checkbox',
'#title' => t('Rebuild theme registry on every page.'),
'#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')),
'#default_value' => theme_get_setting('clear_registry'),
);
}