extremely important to turn off this feature on production websites.', array('!link' => url('admin/appearance/settings/' . $GLOBALS['theme']))), 'warning', false); } // hook_theme() expects an array, so return an empty one. return array(); } /** * Return a themed breadcrumb trail. * * @param $variables * - title: An optional string to be used as a navigational heading to give * context for breadcrumb links to screen-reader users. * - title_attributes_array: Array of HTML attributes for the title. It is * flattened into a string within the theme function. * - breadcrumb: An array containing the breadcrumb links. * @return * A string containing the breadcrumb output. */ function direction_css_breadcrumb($variables) { $breadcrumb = $variables['breadcrumb']; $output = ''; // Determine if we are to display the breadcrumb. $show_breadcrumb = theme_get_setting('direction_css_breadcrumb'); if ($show_breadcrumb == 'yes' || $show_breadcrumb == 'admin' && arg(0) == 'admin') { // Optionally get rid of the homepage link. $show_breadcrumb_home = theme_get_setting('direction_css_breadcrumb_home'); if (!$show_breadcrumb_home) { array_shift($breadcrumb); } // Return the breadcrumb with separators. if (!empty($breadcrumb)) { $breadcrumb_separator = theme_get_setting('direction_css_breadcrumb_separator'); $trailing_separator = $title = ''; if (theme_get_setting('direction_css_breadcrumb_title')) { $item = menu_get_item(); if (!empty($item['tab_parent'])) { // If we are on a non-default tab, use the tab's title. $breadcrumb[] = check_plain($item['title']); } else { $breadcrumb[] = drupal_get_title(); } } elseif (theme_get_setting('direction_css_breadcrumb_trailing')) { $trailing_separator = $breadcrumb_separator; } // Provide a navigational heading to give context for breadcrumb links to // screen-reader users. if (empty($variables['title'])) { $variables['title'] = t('You are here'); } // Unless overridden by a preprocess function, make the heading invisible. if (!isset($variables['title_attributes_array']['class'])) { $variables['title_attributes_array']['class'][] = 'breadcrumb__title element-invisible'; } if (!empty($breadcrumb_separator)) { $breadcrumb_separator = ''.$breadcrumb_separator.''; } if (!empty($trailing_separator)) { $trailing_separator = ''.$trailing_separator.''; } // Build the breadcrumb trail. $li = '