You are here

function _taxonomy_breadcrumb_term_page in Taxonomy Breadcrumb 6

Set a Taxonomy breadcrumb and call the original taxonomy/term/% callback.

@ return The return value of the original callback function.

Parameters

$tid: The TID of the term to call a callback for.

$callback: The name of the original callback function.

$file: The file the original term callback is in.

$filepath: The path to $file.

...: Additional arguments to pass on to the callback.

1 string reference to '_taxonomy_breadcrumb_term_page'
taxonomy_breadcrumb_menu_alter in ./taxonomy_breadcrumb.module
Implementation of hook_menu_alter().

File

./taxonomy_breadcrumb.inc, line 25
helper functions for taxonomy_breadcrumb

Code

function _taxonomy_breadcrumb_term_page($tid, $callback, $file, $filepath) {
  if (is_file($filepath . '/' . $file)) {
    require_once $filepath . '/' . $file;
  }
  $arguments = array_slice(func_get_args(), 4);
  $output = call_user_func_array($callback, $arguments);

  // Use first term to generate breadcrumb trail.
  $terms = taxonomy_terms_parse_string($tid);
  $breadcrumb = _taxonomy_breadcrumb_generate_breadcrumb($terms['tids'][0], TRUE);
  drupal_set_breadcrumb($breadcrumb);
  return $output;
}