root / drupal7 / sites / all / themes / bootstrap / theme / system / region.vars.php @ 87dbc3bf
1 |
<?php
|
---|---|
2 |
/**
|
3 |
* @file
|
4 |
* region.vars.php
|
5 |
*/
|
6 |
|
7 |
/**
|
8 |
* Implements hook_preprocess_region().
|
9 |
*/
|
10 |
function bootstrap_preprocess_region(&$variables) { |
11 |
global $theme; |
12 |
static $wells; |
13 |
if (!isset($wells)) { |
14 |
foreach (system_region_list($theme) as $name => $title) { |
15 |
$wells[$name] = theme_get_setting('bootstrap_region_well-' . $name); |
16 |
} |
17 |
} |
18 |
|
19 |
switch ($variables['region']) { |
20 |
// @todo is this actually used properly?
|
21 |
case 'content': |
22 |
$variables['theme_hook_suggestions'][] = 'region__no_wrapper'; |
23 |
break;
|
24 |
|
25 |
case 'help': |
26 |
$variables['content'] = _bootstrap_icon('question-sign') . $variables['content']; |
27 |
$variables['classes_array'][] = 'alert'; |
28 |
$variables['classes_array'][] = 'alert-info'; |
29 |
break;
|
30 |
} |
31 |
if (!empty($wells[$variables['region']])) { |
32 |
$variables['classes_array'][] = $wells[$variables['region']]; |
33 |
} |
34 |
} |