Projet

Général

Profil

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

root / drupal7 / sites / all / themes / adaptivetheme / at_core / inc / forms / settings.extensions.inc @ 74f6bef0

1 85ad3d82 Assos Assos
<?php
2
3
/**
4
 * @file
5
 * Generate settings for the Extensions form.
6
 */
7 74f6bef0 Assos Assos
function at_core_extensions_form(&$form) {
8
  // Enable Extensions
9
  $form['at-settings']['extend'] = array(
10
    '#type' => 'fieldset',
11
    '#title' => t('Extensions'),
12
    '#description' => t('<h3>Enable Additional Features</h3><p>Extensions include many extras for configuring and styling your site. Enabled extensions will appear in new vertical tabs below the main setting. Extensions can be enabled or disabled individually, so you only load what you need. Disabling the global setting will globally disable most extensions, but not enable them.</p><p>Once you have enabled an extension you will need to configure its settings, then save the theme settings again (to save its configuration).</p>'),
13
  );
14 85ad3d82 Assos Assos
15 74f6bef0 Assos Assos
  // Enable extensions, the extension settings are hidden by default to ease the
16
  // the UI clutter, this setting is also used as a global enable/disable for any
17
  // extension in other logical operations.
18
  $form['at-settings']['extend']['enable_extensions'] = array(
19
    '#type' => 'checkbox',
20
    '#title' => t('Enable extensions <small>(global setting)</small>'),
21
    '#default_value' => at_get_setting('enable_extensions'),
22
  );
23 85ad3d82 Assos Assos
24 74f6bef0 Assos Assos
  $form['at-settings']['extend']['enable'] = array(
25
    '#type' => 'fieldset',
26
    '#title' => t('Extensions'),
27
    '#states' => array(
28
      'visible' => array('input[name="enable_extensions"]' => array('checked' => TRUE)),
29
    ),
30
  );
31 85ad3d82 Assos Assos
32 74f6bef0 Assos Assos
  // Fonts
33
  $form['at-settings']['extend']['enable']['enable_font_settings'] = array(
34
    '#type' => 'checkbox',
35
    '#title' => t('Fonts'),
36
    '#default_value' => at_get_setting('enable_font_settings'),
37
    '#description' => t('Apply fonts to site elements (page, titles, headings, menus and custom selectors). Supports websafe, custom and Google fonts, and <a href="!link" target="_blank">@font-your-face</a> integration.', array('!link' => 'http://drupal.org/project/fontyourface')),
38
  );
39 85ad3d82 Assos Assos
40 74f6bef0 Assos Assos
  // Title styles
41
  $form['at-settings']['extend']['enable']['enable_heading_settings'] = array(
42
    '#type' => 'checkbox',
43
    '#title' => t('Title styles'),
44
    '#default_value' => at_get_setting('enable_heading_settings'),
45
    '#description' => t('Fine grain control over case, weight, alignment and CSS3 text shadows for page title, node, comment and block titles.'),
46
  );
47 85ad3d82 Assos Assos
48 74f6bef0 Assos Assos
  // Image alignment and captions
49
  $form['at-settings']['extend']['enable']['enable_image_settings'] = array(
50
    '#type' => 'checkbox',
51
    '#title' => t('Image alignment and captions'),
52
    '#default_value' => at_get_setting('enable_image_settings'),
53
    '#description' => t('Set default image alignment, image captions and teaser image view.'),
54
  );
55 85ad3d82 Assos Assos
56 74f6bef0 Assos Assos
  // Apple touch icons
57
  $form['at-settings']['extend']['enable']['enable_apple_touch_icons'] = array(
58
    '#type' => 'checkbox',
59
    '#title' => t('Apple touch icons'),
60
    '#description' => t('Check this setting if you want to use touch icons for iOS, Android and Nokia devices.'),
61
    '#default_value' => at_get_setting('enable_apple_touch_icons'),
62
  );
63 85ad3d82 Assos Assos
64 74f6bef0 Assos Assos
  // Unset CSS
65
  $form['at-settings']['extend']['enable']['enable_exclude_css'] = array(
66
    '#type' => 'checkbox',
67
    '#title' => t('Unset CSS Files'),
68
    '#description' => t('Options to unset (exclude) CSS files from loading in your theme - includes settings for Core modules, CSS added by Libaries and your own declared exclusions (see your themes info file under "Stylesheets").'),
69
    '#default_value' => at_get_setting('enable_exclude_css'),
70
  );
71 85ad3d82 Assos Assos
72 74f6bef0 Assos Assos
  // Custom CSS
73
  $form['at-settings']['extend']['enable']['enable_custom_css'] = array(
74
    '#type' => 'checkbox',
75
    '#title' => t('Custom CSS'),
76
    '#description' => t('Enter custom CSS rules for minor adjustment to your theme. Useful if you do not want to build a sub-theme and need modifications to survive theme upgrades if required.'),
77
    '#default_value' => at_get_setting('enable_custom_css'),
78
  );
79 85ad3d82 Assos Assos
80 74f6bef0 Assos Assos
  // Mobile regions and blocks
81
  $form['at-settings']['extend']['enable']['enable_context_regions'] = array(
82
    '#type' => 'checkbox',
83
    '#title' => t('Mobile Regions and Blocks'),
84
    '#description' => t('Unset regions or move blocks to another region in mobile devices. Requires either <a href="!browscap_module" target="_blank">Browscap</a> or <a href="!mobiledetect_module" target="_blank">Mobile Detect</a> for mobile device detection.', array('!browscap_module' => 'http://drupal.org/project/browscap', '!mobiledetect_module' => 'http://drupal.org/project/mobile_detect')),
85
    '#default_value' => at_get_setting('enable_context_regions'),
86
  );
87 85ad3d82 Assos Assos
88 74f6bef0 Assos Assos
  // Menu Toggle
89
  $form['at-settings']['extend']['enable']['enable_menu_toggle'] = array(
90
    '#type' => 'checkbox',
91
    '#title' => t('Mobile Menu Toggle'),
92
    '#description' => t('Collapse the Main menu (or menu block in Menu Bar region) into a clickable link/button. This is a new feature and may not work perfectly with older sub-themes.'),
93
    '#default_value' => at_get_setting('enable_menu_toggle'),
94
  );
95 85ad3d82 Assos Assos
96 74f6bef0 Assos Assos
  // Float Region blocks
97
  $form['at-settings']['extend']['enable']['enable_float_region_blocks'] = array(
98
    '#type' => 'checkbox',
99
    '#title' => t('Float Region blocks'),
100
    '#description' => t('Float blocks in any region - this allows blocks to line up horizontally within a region, similar to a CSS grid or columns.'),
101
    '#default_value' => at_get_setting('enable_float_region_blocks'),
102
  );
103 85ad3d82 Assos Assos
104 74f6bef0 Assos Assos
  // Markup overrides
105
  $form['at-settings']['extend']['enable']['enable_markup_overides'] = array(
106
    '#type' => 'checkbox',
107
    '#title' => t('Markup overrides'),
108
    '#description' => t('Many additional options for adding, removing, hiding and changing site elements and markup - includes:
109
      <ul>
110
        <li>Set the gutter width</li>
111
        <li>Use page--full-width-wrappers.tpl.php for 100% width header and footer designs</li>
112
        <li>Enable page--[content-type].tpl.php suggestions</li>
113
        <li>Wrap menu item text in SPAN tags</li>
114
        <li>Breadcrumb Settings - hide, hide the home link, configure seperator, append the page title</li>
115
        <li>Login Block - hide links, hide OpenID links, horizontal login block</li>
116
        <li>Remove the frontpage title</li>
117
        <li>Do not display the Main content block on the front page</li>
118
        <li>Remove RSS feed icons</li>
119
        <li>Hide comment titles</li>
120
        <li>Remove menu link titles (tool tips)</li>
121
        <li>Accessibility settings - set the skip navigation target ID, use extra fieldsets in the advanced search form</li>
122
        <li>Add rel=author to user names</li>
123
        <li>Add or remove CSS classes for pages, nodes, blocks, comments, menus and item lists</li>
124
      </ul>
125
      '),
126
    '#default_value' => at_get_setting('enable_markup_overides'),
127
  );
128
}