annotate theme-settings.php @ 7:787c247a1b22 tip

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