-
Notifications
You must be signed in to change notification settings - Fork 0
/
theme-settings.php
33 lines (28 loc) · 988 Bytes
/
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
<?php
/**
* Implementation of hook_settings() for themes.
*/
function hubnet_settings($settings) {
// Add js & css
drupal_add_css('misc/farbtastic/farbtastic.css', 'module', 'all', FALSE);
drupal_add_js('misc/farbtastic/farbtastic.js');
drupal_add_js(drupal_get_path('theme', 'hubnet') .'/hubnet-settings.js');
$form = array();
$form['header_color'] = array(
'#title' => t('Header color'),
'#type' => 'textfield',
'#size' => '7',
'#maxlength' => '7',
'#default_value' => !empty($settings['header_color']) ? $settings['header_color'] : '#888888',
'#suffix' => '<div id="hubnet-colorpicker-0"></div>',
);
$form['header_color_dark'] = array(
'#title' => t('Header color dark'),
'#type' => 'textfield',
'#size' => '7',
'#maxlength' => '7',
'#default_value' => !empty($settings['header_color_dark']) ? $settings['header_color_dark'] : '#888888',
'#suffix' => '<div id="hubnet-colorpicker-1"></div>',
);
return $form;
}