123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- <?php
- /**
- * @file
- * Stub file for bootstrap_breadcrumb().
- */
- /**
- * Returns HTML for a breadcrumb trail.
- *
- * @param array $variables
- * An associative array containing:
- * - breadcrumb: An array containing the breadcrumb links.
- *
- * @return string
- * The constructed HTML.
- *
- * @see theme_breadcrumb()
- *
- * @ingroup theme_functions
- */
- function bootstrap_breadcrumb(array $variables) {
- // Use the Path Breadcrumbs theme function if it should be used instead.
- if (_bootstrap_use_path_breadcrumbs()) {
- return path_breadcrumbs_breadcrumb($variables);
- }
- $output = '';
- $breadcrumb = $variables['breadcrumb'];
- // Determine if we are to display the breadcrumb.
- $bootstrap_breadcrumb = bootstrap_setting('breadcrumb');
- if (($bootstrap_breadcrumb == 1 || ($bootstrap_breadcrumb == 2 && arg(0) == 'admin')) && !empty($breadcrumb)) {
- $build = array(
- '#theme' => 'item_list__breadcrumb',
- '#attributes' => array(
- 'class' => array('breadcrumb'),
- ),
- '#items' => $breadcrumb,
- '#type' => 'ol',
- );
- $output = drupal_render($build);
- }
- return $output;
- }
|