function taxonomy_breadcrumb_menu_alter in Taxonomy Breadcrumb 6
Implementation of hook_menu_alter().
File
- ./
taxonomy_breadcrumb.module, line 91 - The taxonomy_breadcrumb module generates taxonomy based breadcrumbs on node pages and taxonomy/term pages. The breadcrumb trail takes on the form: [HOME] >> [VOCABULARY] >> TERM >> [TERM] ...
Code
function taxonomy_breadcrumb_menu_alter(&$items) {
if (isset($items['taxonomy/term/%']['page callback'])) {
$item =& $items['taxonomy/term/%'];
// Store the original configuration, so we can pass it on to our own callback.
$callback = $item['page callback'];
$arguments = $item['page arguments'];
$file = $item['file'];
$filepath = isset($item['file path']) ? $item['file path'] : drupal_get_path('module', $item['module']);
// Alter the original callback.
$item['page callback'] = '_taxonomy_breadcrumb_term_page';
$item['page arguments'] = array_merge(array(
2,
$callback,
$file,
$filepath,
), $arguments);
$item['file'] = 'taxonomy_breadcrumb.inc';
$item['file path'] = drupal_get_path('module', 'taxonomy_breadcrumb');
}
}