3 * Implements hook_form_system_theme_settings_alter() function.
6 * Nested array of form elements that comprise the form.
8 * A keyed array containing the current state of the form.
10 function zen_form_system_theme_settings_alter(&$form, $form_state) {
12 * Create the form using Forms API
14 $form['breadcrumb'] = array(
15 '#type' => 'fieldset',
16 '#title' => t('Breadcrumb settings'),
18 $form['breadcrumb']['zen_breadcrumb'] = array(
20 '#title' => t('Display breadcrumb'),
21 '#default_value' => theme_get_setting('zen_breadcrumb'),
24 'admin' => t('Only in admin section'),
28 $form['breadcrumb']['breadcrumb_options'] = array(
29 '#type' => 'container',
32 ':input[name="zen_breadcrumb"]' => array('value' => 'no'),
36 $form['breadcrumb']['breadcrumb_options']['zen_breadcrumb_separator'] = array(
37 '#type' => 'textfield',
38 '#title' => t('Breadcrumb separator'),
39 '#description' => t('Text only. Don’t forget to include spaces.'),
40 '#default_value' => theme_get_setting('zen_breadcrumb_separator'),
44 $form['breadcrumb']['breadcrumb_options']['zen_breadcrumb_home'] = array(
45 '#type' => 'checkbox',
46 '#title' => t('Show home page link in breadcrumb'),
47 '#default_value' => theme_get_setting('zen_breadcrumb_home'),
49 $form['breadcrumb']['breadcrumb_options']['zen_breadcrumb_trailing'] = array(
50 '#type' => 'checkbox',
51 '#title' => t('Append a separator to the end of the breadcrumb'),
52 '#default_value' => theme_get_setting('zen_breadcrumb_trailing'),
53 '#description' => t('Useful when the breadcrumb is placed just before the title.'),
56 ':input[name="zen_breadcrumb_title"]' => array('checked' => TRUE
),
59 ':input[name="zen_breadcrumb_title"]' => array('checked' => TRUE
),
63 $form['breadcrumb']['breadcrumb_options']['zen_breadcrumb_title'] = array(
64 '#type' => 'checkbox',
65 '#title' => t('Append the content title to the end of the breadcrumb'),
66 '#default_value' => theme_get_setting('zen_breadcrumb_title'),
67 '#description' => t('Useful when the breadcrumb is not placed just before the title.'),
70 $form['themedev'] = array(
71 '#type' => 'fieldset',
72 '#title' => t('Theme development settings'),
74 $form['themedev']['zen_rebuild_registry'] = array(
75 '#type' => 'checkbox',
76 '#title' => t('Rebuild theme registry on every page.'),
77 '#default_value' => theme_get_setting('zen_rebuild_registry'),
78 '#description' => t('During theme development, it can be very useful to continuously <a href="!link">rebuild the theme registry</a>. WARNING: this is a huge performance penalty and must be turned off on production websites.', array('!link' => 'http://drupal.org/node/173880#theme-registry')),
80 $form['themedev']['zen_layout'] = array(
82 '#title' => t('Layout method'),
84 'zen-columns-liquid' => t('Liquid layout') .
' <small>(layout-liquid.css)</small>',
85 'zen-columns-fixed' => t('Fixed layout') .
' <small>(layout-fixed.css)</small>',
87 '#default_value' => theme_get_setting('zen_layout'),
89 $form['themedev']['zen_wireframes'] = array(
90 '#type' => 'checkbox',
91 '#title' => t('Add wireframes around main layout elements'),
92 '#default_value' => theme_get_setting('zen_wireframes'),
93 '#description' => t('<a href="!link">Wireframes</a> are useful when prototyping a website.', array('!link' => 'http://www.boxesandarrows.com/view/html_wireframes_and_prototypes_all_gain_and_no_pain')),