| 1 |
<?php // $Id$
|
| 2 |
|
| 3 |
/**
|
| 4 |
* @file theme-settings.php
|
| 5 |
*/
|
| 6 |
|
| 7 |
/**
|
| 8 |
* Implementation of THEMEHOOK_settings() function.
|
| 9 |
*
|
| 10 |
* @param $saved_settings
|
| 11 |
* array An array of saved settings for this theme.
|
| 12 |
* @return
|
| 13 |
* array A form array.
|
| 14 |
*/
|
| 15 |
function phptemplate_settings($saved_settings) {
|
| 16 |
/*
|
| 17 |
* The default values for the theme variables. Make sure $defaults exactly
|
| 18 |
* matches the $defaults in the template.php file.
|
| 19 |
*/
|
| 20 |
$defaults = array(
|
| 21 |
'newswire_color_global' => 'newswire_tan',
|
| 22 |
'newswire_color_highlight' => 'newswire_red',
|
| 23 |
);
|
| 24 |
|
| 25 |
// Merge the saved variables and their default values
|
| 26 |
$settings = array_merge($defaults, $saved_settings);
|
| 27 |
|
| 28 |
// Create the form widgets using Forms API
|
| 29 |
$form['newswire_color_global'] = array(
|
| 30 |
'#type' => 'select',
|
| 31 |
'#title' => t('Page Colors'),
|
| 32 |
'#default_value' => $settings['newswire_color_global'],
|
| 33 |
'#description' => t('Select the default color for blocks, borders and other page colors and backgrounds.'),
|
| 34 |
'#options' => array(
|
| 35 |
'newswire_p-gray' => t('Gray'),
|
| 36 |
'newswire_tan' => t('Tan'),
|
| 37 |
),
|
| 38 |
);
|
| 39 |
$form['newswire_color_highlight'] = array(
|
| 40 |
'#type' => 'select',
|
| 41 |
'#title' => t('Highlight Colors'),
|
| 42 |
'#default_value' => $settings['newswire_color_highlight'],
|
| 43 |
'#description' => t('Select the default color for the header nav, search box and drop down menus.'),
|
| 44 |
'#options' => array(
|
| 45 |
'newswire_red' => t('Ruby Red'),
|
| 46 |
'newswire_blue' => t('Saphire Blue'),
|
| 47 |
'newswire_green' => t('Emerald Green'),
|
| 48 |
'newswire_orange' => t('Sunset Orange'),
|
| 49 |
'newswire_h-gray' => t('Cloudy Gray'),
|
| 50 |
'newswire_brown' => t('Chocolate Brown'),
|
| 51 |
),
|
| 52 |
);
|
| 53 |
|
| 54 |
// Return the additional form widgets
|
| 55 |
return $form;
|
| 56 |
}
|