| 1 |
<?php
|
| 2 |
// $Id: theme-settings.php,v 1.7 2008/09/11 09:36:50 johnalbin Exp $
|
| 3 |
|
| 4 |
// Include the definition of zen_settings() and zen_theme_get_default_settings().
|
| 5 |
include_once './' . drupal_get_path('theme', 'zen') . '/theme-settings.php';
|
| 6 |
|
| 7 |
|
| 8 |
/**
|
| 9 |
* Implementation of THEMEHOOK_settings() function.
|
| 10 |
*
|
| 11 |
* @param $saved_settings
|
| 12 |
* An array of saved settings for this theme.
|
| 13 |
* @return
|
| 14 |
* A form array.
|
| 15 |
*/
|
| 16 |
function airyblue_settings($saved_settings) {
|
| 17 |
|
| 18 |
// Get the default values from the .info file.
|
| 19 |
$defaults = zen_theme_get_default_settings('airyblue');
|
| 20 |
|
| 21 |
// Merge the saved variables and their default values.
|
| 22 |
$settings = array_merge($defaults, $saved_settings);
|
| 23 |
|
| 24 |
/*
|
| 25 |
* Create the form using Forms API: http://api.drupal.org/api/6
|
| 26 |
*/
|
| 27 |
$form = array();
|
| 28 |
/* -- Delete this line if you want to use this setting
|
| 29 |
$form['airyblue_example'] = array(
|
| 30 |
'#type' => 'checkbox',
|
| 31 |
'#title' => t('Use this sample setting'),
|
| 32 |
'#default_value' => $settings['airyblue_example'],
|
| 33 |
'#description' => t("This option doesn't do anything; it's just an example."),
|
| 34 |
);
|
| 35 |
// */
|
| 36 |
|
| 37 |
// Add the base theme's settings.
|
| 38 |
$form += zen_settings($saved_settings, $defaults);
|
| 39 |
|
| 40 |
// Remove some of the base theme's settings.
|
| 41 |
unset($form['themedev']['zen_layout']); // We don't need to select the base stylesheet.
|
| 42 |
|
| 43 |
// Return the form
|
| 44 |
return $form;
|
| 45 |
}
|