1 |
87dbc3bf
|
Benjamin Luce
|
<?php
|
2 |
|
|
|
3 |
|
|
|
4 |
|
|
|
5 |
|
|
|
6 |
|
|
|
7 |
|
|
|
8 |
|
|
|
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 |
|
|
|
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 |
|
|
} |