Projet

Général

Profil

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

root / drupal7 / sites / all / themes / pixture_reloaded / theme-settings.php @ 4b706e38

1
<?php
2

    
3
// Set this no matter what, we need this to happen
4
if (module_exists('noggin')) {
5
  variable_set('noggin:header_selector', '#header .header-inner');
6
}
7

    
8

    
9
/**
10
 * Implements hook_form_system_theme_settings_alter().
11
 *
12
 * @param $form
13
 *   Nested array of form elements that comprise the form.
14
 * @param $form_state
15
 *   A keyed array containing the current state of the form.
16
 */
17
function pixture_reloaded_form_system_theme_settings_alter(&$form, &$form_state) {
18

    
19
  // Include a hidden form field with the current release information
20
  $form['at-release'] = array(
21
    '#type' => 'hidden',
22
    '#default_value' => '7.x-3.x',
23
  );
24

    
25
  // Remove option to use full width wrappers
26
  $form['at']['modify-output']['design']['page_full_width_wrappers'] = array(
27
    '#access' => FALSE,
28
  );
29

    
30
  // Tell the submit function its safe to run the color inc generator
31
  // if running on AT Core 7.x-3.x
32
  $form['at-color'] = array(
33
    '#type' => 'hidden',
34
    '#default_value' => TRUE,
35
  );
36

    
37
  if (at_get_setting('enable_extensions') === 1) {
38
    $form['at']['corners'] = array(
39
      '#type' => 'fieldset',
40
      '#title' => t('Rounded corners'),
41
    );
42
    $form['at']['corners']['corner_radius'] = array(
43
      '#type' => 'select',
44
      '#title' => t('Corner radius'),
45
      '#default_value' => theme_get_setting('corner_radius'),
46
      '#description' => t('Change the corner radius for blocks, node teasers and comments.'),
47
      '#options' => array(
48
        'rc-0' => t('none'),
49
        'rc-4' => t('4px'),
50
        'rc-8' => t('8px'),
51
        'rc-12' => t('12px'),
52
      ),
53
    );
54
    $form['at']['pagestyles'] = array(
55
      '#type' => 'fieldset',
56
      '#title' => t('Box Shadows and Textures'),
57
      '#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>'),
58
    );
59
    $form['at']['pagestyles']['shadows'] = array(
60
      '#type' => 'fieldset',
61
      '#title' => t('Box Shadows'),
62
      '#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>'),
63
    );
64
    $form['at']['pagestyles']['shadows']['box_shadows'] = array(
65
      '#type' => 'radios',
66
      '#title' => t('<strong>Apply a box shadow to the main content column</strong>'),
67
      '#default_value' => theme_get_setting('box_shadows'),
68
      '#options' => array(
69
        'bs-n' => t('None'),
70
        'bs-l' => t('Box shadow - light'),
71
        'bs-d' => t('Box shadow - dark'),
72
      ),
73
    );
74
    $form['at']['pagestyles']['textures'] = array(
75
      '#type' => 'fieldset',
76
      '#title' => t('Textures'),
77
      '#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>'),
78
    );
79
    $form['at']['pagestyles']['textures']['body_background'] = array(
80
      '#type' => 'select',
81
      '#title' => t('Select texture'),
82
      '#default_value' => theme_get_setting('body_background'),
83
      '#options' => array(
84
        'bb-n'  => t('None'),
85
        'bb-h'  => t('Hatch'),
86
        'bb-vl' => t('Vertical lines'),
87
        'bb-hl' => t('Horizontal lines'),
88
        'bb-g'  => t('Grid'),
89
        'bb-d'  => t('Dots'),
90
      ),
91
    );
92
    $form['at']['menus'] = array(
93
      '#type' => 'fieldset',
94
      '#title' => t('Menu Settings'),
95
    );
96
    $form['at']['menus']['mbp'] = array(
97
      '#type' => 'fieldset',
98
      '#title' => t('Menu Bar Alignment'),
99
      '#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>'),
100
    );
101
    $form['at']['menus']['mbp']['menu_bar_position'] = array(
102
      '#type' => 'radios',
103
      '#title' => t('Set the position of the Menu bar'),
104
      '#default_value' => theme_get_setting('menu_bar_position'),
105
      '#options' => array(
106
        'mbp-l' => t('Left (default)'),
107
        'mbp-c' => t('Center'),
108
        'mbp-r' => t('Right'),
109
      ),
110
    );
111
    $form['at']['menus']['mb'] = array(
112
      '#type' => 'fieldset',
113
      '#title' => t('Menu Bullets'),
114
      '#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>'),
115
    );
116
    $form['at']['menus']['mb']['menu_bullets'] = array(
117
      '#type' => 'select',
118
      '#title' => t('Menu Bullets'),
119
      '#default_value' => theme_get_setting('menu_bullets'),
120
      '#options' => array(
121
        'mb-n' => t('None'),
122
        'mb-dd' => t('Drupal default'),
123
        'mb-ah' => t('Arrow head'),
124
        'mb-ad' => t('Double arrow head'),
125
        'mb-ca' => t('Circle arrow'),
126
        'mb-fa' => t('Fat arrow'),
127
        'mb-sa' => t('Skinny arrow'),
128
      ),
129
    );
130
  }
131
}