Projet

Général

Profil

Paste
Télécharger (727 octets) Statistiques
| Branche: | Révision:

root / drupal7 / sites / all / themes / bootstrap / theme / system / breadcrumb.vars.php @ 87dbc3bf

1
<?php
2
/**
3
 * @file
4
 * breadcrumb.vars.php
5
 */
6

    
7
/**
8
 * Implements hook_preprocess_breadcrumb().
9
 */
10
function bootstrap_preprocess_breadcrumb(&$variables) {
11
  $breadcrumb = &$variables['breadcrumb'];
12

    
13
  // Optionally get rid of the homepage link.
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
      // If we are on a non-default tab, use the tab's title.
23
      'data' => !empty($item['tab_parent']) ? check_plain($item['title']) : drupal_get_title(),
24
      'class' => array('active'),
25
    );
26
  }
27
}