forked from WhiteHouse/fortyfour
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy paththeme-settings.php
111 lines (93 loc) · 3.39 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
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
99
100
101
102
103
104
105
106
107
108
109
110
111
<?php
/**
* @file
* Theme setting callbacks for the fortyfour base theme.
*/
require_once drupal_get_path('theme', 'fortyfour') . '/template.php';
/**
* Implements hook_form_system_theme_settings_alter().
*
* @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 fortyfour_form_system_theme_settings_alter(&$form, &$form_state, $form_id = NULL) {
// Get headers and footer values.
// - $fortyfour_page_wrapper
// - $fortyfour_header
// - $fortyfour_header_menu
// - $fortyfour_footer_menu
// - $fortyfour_subfooter_menu
// - $fortyfour_use_microsite_banner
$fortyfour_page_wrapper = _fortyfour_get_page_wrapper();
$fortyfour_use_microsite_banner = _fortyfour_get_use_microsite_banner();
$form['fortyfour_general'] = array(
'#type' => 'fieldset',
'#title' => t('Forty Four: General Assets'),
'#collapsible' => TRUE,
'#weight' => -5,
);
$form['fortyfour_general']['description'] = array(
'#type' => 'markup',
'#title' => t('Default Settings'),
'#collapsible' => TRUE,
'#weight' => -2,
);
$form['fortyfour_general']['fortyfour_page_wrapper'] = array(
'#type' => 'textfield',
'#title' => t('CSS Class name for the page wrapper'),
'#description' => t('Check this to default to the built-in configuration for these settings (for migration purposes) - var: $fortyfour_page_wrapper'),
'#default_value' => $fortyfour_page_wrapper,
'#weight' => 0,
);
$form['fortyfour_menus'] = array(
'#type' => 'fieldset',
'#title' => t('Forty Four: Header & Footer Assets'),
'#collapsible' => TRUE,
'#weight' => -4,
);
$form['fortyfour_menus']['description'] = array(
'#type' => 'markup',
'#title' => t('Default Settings'),
'#collapsible' => TRUE,
'#weight' => -2,
);
$form['fortyfour_menus']['fortyfour_use_whitehouse_header'] = array(
'#type' => 'checkbox',
'#title' => t('Use approved White House header asset.'),
'#default_value' => theme_get_setting('fortyfour_use_whitehouse_header'),
);
$form['fortyfour_menus']['fortyfour_use_whitehouse_mainnav'] = array(
'#type' => 'checkbox',
'#title' => t('Use approved White House main navigation asset.'),
'#default_value' => theme_get_setting('fortyfour_use_whitehouse_mainnav'),
);
$form['fortyfour_menus']['fortyfour_use_whitehouse_footer'] = array(
'#type' => 'checkbox',
'#title' => t('Use approved White House footer asset.'),
'#default_value' => theme_get_setting('fortyfour_use_whitehouse_footer'),
);
$form['fortyfour_menus']['fortyfour_use_whitehouse_subfooter'] = array(
'#type' => 'checkbox',
'#title' => t('Use approved White House sub-footer asset.'),
'#default_value' => theme_get_setting('fortyfour_use_whitehouse_subfooter'),
);
$form['fortyfour_shared'] = array(
'#type' => 'fieldset',
'#title' => 'Forty Four: Settings for Shared Elements',
'#collapsible' => TRUE,
'#weight' => -3,
);
$form['fortyfour_shared']['description'] = array(
'#type' => 'markup',
'#title' => t('Settings for Shared Elements'),
'#collapsible' => TRUE,
'#weight' => 0,
);
$form['fortyfour_shared']['fortyfour_use_microsite_banner'] = array(
'#type' => 'checkbox',
'#title' => t('Use shared banner on Forty Four site'),
'#default_value' => $fortyfour_use_microsite_banner,
);
}