1 |
87dbc3bf
|
Benjamin Luce
|
<?php
|
2 |
|
|
|
3 |
|
|
|
4 |
|
|
|
5 |
|
|
|
6 |
|
|
|
7 |
|
|
|
8 |
|
|
|
9 |
|
|
|
10 |
|
|
function bootstrap_preprocess_breadcrumb(&$variables) {
|
11 |
|
|
$breadcrumb = &$variables['breadcrumb'];
|
12 |
|
|
|
13 |
|
|
|
14 |
|
|
$show_breadcrumb_home = theme_get_setting('bootstrap_breadcrumb_home');
|
15 |
|
|
if (!$show_breadcrumb_home) {
|
16 |
|
|
array_shift($breadcrumb);
|
17 |
|
|
}
|
18 |
|
|
|
19 |
|
|
if (theme_get_setting('bootstrap_breadcrumb_title') && !empty($breadcrumb)) {
|
20 |
|
|
$item = menu_get_item();
|
21 |
|
|
$breadcrumb[] = array(
|
22 |
|
|
|
23 |
|
|
'data' => !empty($item['tab_parent']) ? check_plain($item['title']) : drupal_get_title(),
|
24 |
|
|
'class' => array('active'),
|
25 |
|
|
);
|
26 |
|
|
}
|
27 |
|
|
} |