Projet

Général

Profil

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

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