Projet

Général

Profil

Paste
Télécharger (5,62 ko) Statistiques
| Branche: | Révision:

root / drupal7 / sites / all / themes / corporateclean / theme-settings.php @ 87dbc3bf

1
<?php
2
/**
3
 * Implements hook_form_FORM_ID_alter().
4
 *
5
 * @param $form
6
 *   The form.
7
 * @param $form_state
8
 *   The form state.
9
 */
10
function corporateclean_form_system_theme_settings_alter(&$form, &$form_state) {
11

    
12
  $form['mtt_settings'] = array(
13
    '#type' => 'fieldset',
14
    '#title' => t('Corporate Clean Theme Settings'),
15
    '#collapsible' => FALSE,
16
        '#collapsed' => FALSE,
17
  );
18

    
19
  $form['mtt_settings']['breadcrumb'] = array(
20
    '#type' => 'fieldset',
21
    '#title' => t('Breadcrumb'),
22
    '#collapsible' => TRUE,
23
        '#collapsed' => FALSE,
24
  );
25
  
26
  $form['mtt_settings']['breadcrumb']['breadcrumb_display'] = array(
27
    '#type' => 'checkbox',
28
    '#title' => t('Show breadcrumb'),
29
          '#description'   => t('Use the checkbox to enable or disable breadcrumb.'),
30
        '#default_value' => theme_get_setting('breadcrumb_display','corporateclean'),
31
  );
32
  
33
  $form['mtt_settings']['breadcrumb']['breadcrumb_separator'] = array(
34
    '#type' => 'textfield',
35
    '#title' => t('Breadcrumb separator'),
36
        '#default_value' => theme_get_setting('breadcrumb_separator','corporateclean'),
37
    '#size'          => 5,
38
    '#maxlength'     => 10,
39
  );
40
  
41
  $form['mtt_settings']['breadcrumb']['breadcrumb_home'] = array(
42
    '#type'          => 'checkbox',
43
    '#title'         => t('Show home page link in breadcrumb'),
44
          '#description'   => t('Use the checkbox to enable or disable the home page link in breadcrumb.'),
45
    '#default_value' => theme_get_setting('breadcrumb_home'),
46
  );
47
  
48
  $form['mtt_settings']['slideshow'] = array(
49
    '#type' => 'fieldset',
50
    '#title' => t('Front Page Slideshow'),
51
    '#collapsible' => TRUE,
52
        '#collapsed' => FALSE,
53
  );
54
  
55
  $form['mtt_settings']['slideshow']['slideshow_display'] = array(
56
    '#type' => 'checkbox',
57
    '#title' => t('Show slideshow'),
58
        '#default_value' => theme_get_setting('slideshow_display','corporateclean'),
59
  );
60
  
61
  $form['mtt_settings']['slideshow']['slideshow_js'] = array(
62
    '#type' => 'checkbox',
63
    '#title' => t('Include slideshow javascript code'),
64
        '#default_value' => theme_get_setting('slideshow_js','corporateclean'),
65
  );
66
  
67
  $form['mtt_settings']['slideshow']['slideshow_effect'] = array(
68
    '#type' => 'select',
69
    '#title' => t('Effects'),
70
          '#description'   => t('From the drop-down menu, select the slideshow effect you prefer.'),
71
        '#default_value' => theme_get_setting('slideshow_effect','corporateclean'),
72
    '#options' => array(
73
                'blindX' => t('blindX'),
74
                'blindY' => t('blindY'),
75
                'blindZ' => t('blindZ'),
76
                'cover' => t('cover'),
77
                'curtainX' => t('curtainX'),
78
                'curtainY' => t('curtainY'),
79
                'fade' => t('fade'),
80
                'fadeZoom' => t('fadeZoom'),
81
                'growX' => t('growX'),
82
                'growY' => t('growY'),
83
                'scrollUp' => t('scrollUp'),
84
                'scrollDown' => t('scrollDown'),
85
                'scrollLeft' => t('scrollLeft'),
86
                'scrollRight' => t('scrollRight'),
87
                'scrollHorz' => t('scrollHorz'),
88
                'scrollVert' => t('scrollVert'),
89
                'shuffle' => t('shuffle'),
90
                'slideX' => t('slideX'),
91
                'slideY' => t('slideY'),
92
                'toss' => t('toss'),
93
                'turnUp' => t('turnUp'),
94
                'turnDown' => t('turnDown'),
95
                'turnLeft' => t('turnLeft'),
96
                'turnRight' => t('turnRight'),
97
                'uncover' => t('uncover'),
98
                'wipe' => t('wipe'),
99
                'zoom' => t('zoom'),
100
    ),
101
  );
102
  
103
  $form['mtt_settings']['slideshow']['slideshow_effect_time'] = array(
104
    '#type' => 'textfield',
105
    '#title' => t('Effect duration (sec)'),
106
        '#default_value' => theme_get_setting('slideshow_effect_time','corporateclean'),
107
  );
108
  
109
  $form['mtt_settings']['slideshow']['slideshow_randomize'] = array(
110
    '#type' => 'checkbox',
111
    '#title' => t('Randomize slideshow order'),
112
        '#default_value' => theme_get_setting('slideshow_randomize','corporateclean'),
113
  );
114
  
115
  $form['mtt_settings']['slideshow']['slideshow_wrap'] = array(
116
    '#type' => 'checkbox',
117
    '#title' => t('Prevent slideshow from wrapping'),
118
        '#default_value' => theme_get_setting('slideshow_wrap','corporateclean'),
119
  );
120
  
121
  $form['mtt_settings']['slideshow']['slideshow_pause'] = array(
122
    '#type' => 'checkbox',
123
    '#title' => t('Pause slideshow on hover'),
124
        '#default_value' => theme_get_setting('slideshow_pause','corporateclean'),
125
  );
126
  
127
  $form['mtt_settings']['support'] = array(
128
    '#type' => 'fieldset',
129
    '#title' => t('Accessibility and support settings'),
130
    '#collapsible' => TRUE,
131
        '#collapsed' => FALSE,
132
  );
133
  
134
  $form['mtt_settings']['support']['responsive'] = array(
135
    '#type' => 'fieldset',
136
    '#title' => t('Responsive'),
137
    '#collapsible' => TRUE,
138
        '#collapsed' => FALSE,
139
  );
140
  
141
  $form['mtt_settings']['support']['responsive']['responsive_meta'] = array(
142
    '#type' => 'checkbox',
143
    '#title' => t('Add meta tags to support responsive design on mobile devices.'),
144
        '#default_value' => theme_get_setting('responsive_meta','corporateclean'),
145
  );
146
  
147
  $form['mtt_settings']['support']['responsive']['responsive_respond'] = array(
148
    '#type' => 'checkbox',
149
    '#title' => t('Add Respond.js JavaScript to add basic CSS3 media query support to IE 6-8.'),
150
        '#default_value' => theme_get_setting('responsive_respond','corporateclean'),
151
    '#description'   => t('IE 6-8 require a JavaScript polyfill solution to add basic support of CSS3 media queries. Note that you should enable <strong>Aggregate and compress CSS files</strong> through <em>/admin/config/development/performance</em>.'),
152
  );
153
    
154
  $form['mtt_settings']['credits'] = array(
155
    '#type' => 'fieldset',
156
    '#title' => t('Credits'),
157
    '#collapsible' => TRUE,
158
        '#collapsed' => FALSE,
159
  );
160
  
161
  $form['mtt_settings']['credits']['credits_display'] = array(
162
    '#type' => 'checkbox',
163
    '#title' => t('Show credits'),
164
          '#description'   => t('Use the checkbox to enable or disable credits.'),
165
        '#default_value' => theme_get_setting('credits_display','corporateclean'),
166
  );
167
  
168
}