Projet

Général

Profil

Paste
Télécharger (4,6 ko) Statistiques
| Branche: | Révision:

root / htmltest / sites / all / themes / pixture_reloaded / theme-settings.php @ 6c38d829

1
<?php
2
/**
3
 * Implements hook_form_system_theme_settings_alter().
4
 *
5
 * @param $form
6
 *   Nested array of form elements that comprise the form.
7
 * @param $form_state
8
 *   A keyed array containing the current state of the form.
9
 */
10
function pixture_reloaded_form_system_theme_settings_alter(&$form, &$form_state) {
11

    
12
  // Include a hidden form field with the current release information
13
  $form['at-release'] = array(
14
    '#type' => 'hidden',
15
    '#default_value' => '7.x-3.x',
16
  );
17

    
18
  // Tell the submit function its safe to run the color inc generator
19
  // if running on AT Core 7.x-3.x
20
  $form['at-color'] = array(
21
    '#type' => 'hidden',
22
    '#default_value' => TRUE,
23
  );
24

    
25
  if (at_get_setting('enable_extensions') === 1) {
26
    $form['at']['corners'] = array(
27
      '#type' => 'fieldset',
28
      '#title' => t('Rounded corners'),
29
    );
30
    $form['at']['corners']['corner_radius'] = array(
31
      '#type' => 'select',
32
      '#title' => t('Corner radius'),
33
      '#default_value' => theme_get_setting('corner_radius'),
34
      '#description' => t('Change the corner radius for blocks, node teasers and comments.'),
35
      '#options' => array(
36
        'rc-0' => t('none'),
37
        'rc-4' => t('4px'),
38
        'rc-8' => t('8px'),
39
        'rc-12' => t('12px'),
40
      ),
41
    );
42
    $form['at']['pagestyles'] = array(
43
      '#type' => 'fieldset',
44
      '#title' => t('Box Shadows and Textures'),
45
      '#description' => t('<h3>Shadows and Textures</h3><p>The box shadows are implimented using CSS and only work in modern compliant browsers. The textures are small, semi-transparent images that tile to fill the entire background.</p>'),
46
    );
47
    $form['at']['pagestyles']['shadows'] = array(
48
      '#type' => 'fieldset',
49
      '#title' => t('Box Shadows'),
50
      '#description' => t('<h3>Box Shadows</h3><p>Box shadows (a drop shadow/glow effect) apply to the main content column and work only in CSS3 compliant browsers such as Firefox, Safari and Chrome.</p>'),
51
    );
52
    $form['at']['pagestyles']['shadows']['box_shadows'] = array(
53
      '#type' => 'radios',
54
      '#title' => t('<strong>Apply a box shadow to the main content column</strong>'),
55
      '#default_value' => theme_get_setting('box_shadows'),
56
      '#options' => array(
57
        'bs-n' => t('None'),
58
        'bs-l' => t('Box shadow - light'),
59
        'bs-d' => t('Box shadow - dark'),
60
      ),
61
    );
62
    $form['at']['pagestyles']['textures'] = array(
63
      '#type' => 'fieldset',
64
      '#title' => t('Textures'),
65
      '#description' => t('<h3>Body Textures</h3><p>This setting adds a texture over the main background color - the darker the background the more these stand out, on light backgrounds the effect is subtle.</p>'),
66
    );
67
    $form['at']['pagestyles']['textures']['body_background'] = array(
68
      '#type' => 'select',
69
      '#title' => t('Select texture'),
70
      '#default_value' => theme_get_setting('body_background'),
71
      '#options' => array(
72
        'bb-n'  => t('None'),
73
        'bb-h'  => t('Hatch'),
74
        'bb-vl' => t('Vertical lines'),
75
        'bb-hl' => t('Horizontal lines'),
76
        'bb-g'  => t('Grid'),
77
        'bb-d'  => t('Dots'),
78
      ),
79
    );
80
    $form['at']['menus'] = array(
81
      '#type' => 'fieldset',
82
      '#title' => t('Menu Settings'),
83
    );
84
    $form['at']['menus']['mbp'] = array(
85
      '#type' => 'fieldset',
86
      '#title' => t('Menu Bar Alignment'),
87
      '#description' => t('<h3>Menu Bar Alignment</h3><p>Position the Menu Bar left, center or right. This will position any menu (Superfish included) placed in the Menu Bar region.</p>'),
88
    );
89
    $form['at']['menus']['mbp']['menu_bar_position'] = array(
90
      '#type' => 'radios',
91
      '#title' => t('Set the position of the Menu bar'),
92
      '#default_value' => theme_get_setting('menu_bar_position'),
93
      '#options' => array(
94
        'mbp-l' => t('Left (default)'),
95
        'mbp-c' => t('Center'),
96
        'mbp-r' => t('Right'),
97
      ),
98
    );
99
    $form['at']['menus']['mb'] = array(
100
      '#type' => 'fieldset',
101
      '#title' => t('Menu Bullets'),
102
      '#description' => t('<h3>Menu Bullets</h3><p>This setting allows you to customize the bullet images used on menus items. Bullet images only show on normal vertical block menus.</p>'),
103
    );
104
    $form['at']['menus']['mb']['menu_bullets'] = array(
105
      '#type' => 'select',
106
      '#title' => t('Menu Bullets'),
107
      '#default_value' => theme_get_setting('menu_bullets'),
108
      '#options' => array(
109
        'mb-n' => t('None'),
110
        'mb-dd' => t('Drupal default'),
111
        'mb-ah' => t('Arrow head'),
112
        'mb-ad' => t('Double arrow head'),
113
        'mb-ca' => t('Circle arrow'),
114
        'mb-fa' => t('Fat arrow'),
115
        'mb-sa' => t('Skinny arrow'),
116
      ),
117
    );
118
  }
119
}