Projet

Général

Profil

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

root / drupal7 / sites / all / themes / sky / theme-settings.php @ 2734bffc

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

    
30
  if (at_get_setting('enable_extensions') === 1) {
31
    $form['at']['corners'] = array(
32
      '#type' => 'fieldset',
33
      '#title' => t('Rounded corners'),
34
      '#description' => t('<h3>Rounded Corners</h3><p>Rounded corners are implimented using CSS and only work in modern compliant browsers. You can set the radius for both the main content and main menu tabs.</p>'),
35
    );
36
    $form['at']['corners']['content_corner_radius'] = array(
37
      '#type' => 'select',
38
      '#title' => t('Main content radius'),
39
      '#default_value' => theme_get_setting('content_corner_radius'),
40
      '#description' => t('Change the corner radius for the main content area.'),
41
      '#options' => array(
42
        'rc-0' => t('none'),
43
        'rc-4' => t('4px'),
44
        'rc-6' => t('6px'),
45
        'rc-8' => t('8px'),
46
        'rc-10' => t('10px'),
47
        'rc-12' => t('12px'),
48
      ),
49
    );
50
    $form['at']['corners']['tabs_corner_radius'] = array(
51
      '#type' => 'select',
52
      '#title' => t('Menu tabs radius'),
53
      '#default_value' => theme_get_setting('tabs_corner_radius'),
54
      '#description' => t('Change the corner radius for the main menu tabs.'),
55
      '#options' => array(
56
        'rct-0' => t('none'),
57
        'rct-4' => t('4px'),
58
        'rct-6' => t('6px'),
59
        'rct-8' => t('8px'),
60
        'rct-10' => t('10px'),
61
        'rct-12' => t('12px'),
62
      ),
63
    );
64
    $form['at']['pagestyles'] = array(
65
      '#type' => 'fieldset',
66
      '#title' => t('Textures'),
67
      '#description' => t('<h3>Textures</h3><p>Textures are small, semi-transparent images that tile to fill the entire page background.</p>'),
68
    );
69
    $form['at']['pagestyles']['textures'] = array(
70
      '#type' => 'fieldset',
71
      '#title' => t('Textures'),
72
      '#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>'),
73
    );
74
    $form['at']['pagestyles']['textures']['body_background'] = array(
75
      '#type' => 'select',
76
      '#title' => t('Select texture'),
77
      '#default_value' => theme_get_setting('body_background'),
78
      '#options' => array(
79
        'bb-n'  => t('None'),
80
        'bb-h'  => t('Hatch'),
81
        'bb-vl' => t('Vertical lines'),
82
        'bb-hl' => t('Horizontal lines'),
83
        'bb-g'  => t('Grid'),
84
        'bb-d'  => t('Dots'),
85
      ),
86
    );
87
    $form['at']['menu_styles'] = array(
88
      '#type' => 'fieldset',
89
      '#title' => t('Menu Settings'),
90
      '#description' => t('<h3>Menu Bullets</h3><p>Customize the bullet images used on menus items. Bullet images only show on normal vertical block menus.</p>'),
91
    );
92
    $form['at']['menu_styles']['menu_bullets'] = array(
93
      '#type' => 'select',
94
      '#title' => t('Menu Bullets'),
95
      '#default_value' => theme_get_setting('menu_bullets'),
96
      '#options' => array(
97
        'mb-n' => t('None'),
98
        'mb-dd' => t('Drupal default'),
99
        'mb-ah' => t('Arrow head'),
100
        'mb-ad' => t('Double arrow head'),
101
        'mb-ca' => t('Circle arrow'),
102
        'mb-fa' => t('Fat arrow'),
103
        'mb-sa' => t('Skinny arrow'),
104
      ),
105
    );
106
    $form['at']['menu_styles']['mbp'] = array(
107
      '#type' => 'fieldset',
108
      '#title' => t('Menu Bar Alignment'),
109
      '#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>'),
110
    );
111
    $form['at']['menu_styles']['mbp']['menu_bar_position'] = array(
112
      '#type' => 'radios',
113
      '#title' => t('Set the position of the Menu bar'),
114
      '#default_value' => theme_get_setting('menu_bar_position'),
115
      '#options' => array(
116
        'mbp-l' => t('Left (default)'),
117
        'mbp-c' => t('Center'),
118
        'mbp-r' => t('Right'),
119
      ),
120
    );
121
  }
122
}