-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy paththeme-settings.php
More file actions
45 lines (40 loc) · 1.56 KB
/
theme-settings.php
File metadata and controls
45 lines (40 loc) · 1.56 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
<?php
/**
* USAGE:
* 1 - To use this file replace "adaptivetheme_devtheme" with the name of
* your theme in the function below.
* 2 - Set 'style_enable_schemes' to 'on' in your themes info file (its near the bottom of that file).
* 2 - Build or un-comment the forms. The Style Schemes form is ready to use,
* just un-comment it.
*/
// Replace 'adaptivetheme_devtheme' with your themes name, eg:
// function your_themes_name_form_system_theme_settings_alter(&$form, &$form_state)
function adaptivetheme_devtheme_form_system_theme_settings_alter(&$form, &$form_state) {
// Style Schemes
/* -- Delete this line if you want to use Style Schemes
if (theme_get_setting('style_enable_schemes') == 'on') {
$form['style'] = array(
'#type' => 'fieldset',
'#title' => t('Style settings'),
'#collapsible' => TRUE,
'#collapsed' => TRUE,
'#weight' => 90,
'#description' => t('Use these settings to modify the style of your theme, such as the color scheme.'),
);
$form['style']['style_schemes'] = array(
'#type' => 'select',
'#title' => t('Styles'),
'#default_value' => theme_get_setting('style_schemes'),
'#options' => array(
'none' => t('None'),
'style-default.css' => t('Default Style'),
// 'my-style.css' => t('My Style'), // Add your schemes, these MUST be placed in your subthemes /schemes directory!
),
);
$form['style']['style_enable_schemes'] = array(
'#type' => 'hidden',
'#value' => theme_get_setting('style_enable_schemes'),
);
}
// */
}