root / drupal7 / sites / all / themes / bootstrap / templates / system / region.vars.php @ 749b8a23
1 | caf16a48 | Assos Assos | <?php
|
---|---|---|---|
2 | /**
|
||
3 | * @file
|
||
4 | * Stub file for "region" theme hook [pre]process functions.
|
||
5 | */
|
||
6 | |||
7 | /**
|
||
8 | * Pre-processes variables for the "region" theme hook.
|
||
9 | *
|
||
10 | * See template for list of available variables.
|
||
11 | *
|
||
12 | * @see region.tpl.php
|
||
13 | *
|
||
14 | * @ingroup theme_preprocess
|
||
15 | */
|
||
16 | function bootstrap_preprocess_region(&$variables) { |
||
17 | global $theme; |
||
18 | |||
19 | $region = $variables['region']; |
||
20 | $classes = &$variables['classes_array']; |
||
21 | |||
22 | // Content region.
|
||
23 | if ($region === 'content') { |
||
24 | // @todo is this actually used properly?
|
||
25 | $variables['theme_hook_suggestions'][] = 'region__no_wrapper'; |
||
26 | } |
||
27 | // Help region.
|
||
28 | elseif ($region === 'help' && !empty($variables['content'])) { |
||
29 | $variables['content'] = _bootstrap_icon('question-sign') . $variables['content']; |
||
30 | $classes[] = 'alert'; |
||
31 | $classes[] = 'alert-info'; |
||
32 | $classes[] = 'messages'; |
||
33 | $classes[] = 'info'; |
||
34 | } |
||
35 | |||
36 | // Support for "well" classes in regions.
|
||
37 | static $wells; |
||
38 | if (!isset($wells)) { |
||
39 | foreach (system_region_list($theme) as $name => $title) { |
||
40 | $wells[$name] = bootstrap_setting('region_well-' . $name); |
||
41 | } |
||
42 | } |
||
43 | if (!empty($wells[$region])) { |
||
44 | $classes[] = $wells[$region]; |
||
45 | } |
||
46 | } |