function custom_breadcrumbs_taxonomy_term_page in Custom Breadcrumbs 6.2
Sets a taxonomy breadcrumb and calls the original taxonomy/term/% callback.
Parameters
$callback: A callback function as defined in hook_menu().
$file: A callback file as defined in hook_menu().
$filepath: A callback file path as defined in hook_menu().
$str_tids: A term selector string, e.g. "1,3,8" or "4+9".
...: Additional arguments to pass on to the callback.
Return value
The return value of the original callback function.
1 string reference to 'custom_breadcrumbs_taxonomy_term_page'
- custom_breadcrumbs_taxonomy_menu_alter in custom_breadcrumbs_taxonomy/
custom_breadcrumbs_taxonomy.module - Implements hook_menu_alter().
File
- custom_breadcrumbs_taxonomy/
custom_breadcrumbs_taxonomy.inc, line 25 - Helper functions for custom_breadcrumbs_taxonomy.
Code
function custom_breadcrumbs_taxonomy_term_page($str_tids, $callback, $file, $filepath) {
$args = array_slice(func_get_args(), 4);
// Use first term to generate breadcrumb trail.
$tids = taxonomy_terms_parse_string($str_tids);
$terms = array();
foreach ($tids['tids'] as $tid) {
$term = taxonomy_get_term($tid);
if ($term) {
$terms[$term->tid] = $term;
}
}
if (is_file($filepath . '/' . $file)) {
require_once $filepath . '/' . $file;
}
$output = call_user_func_array($callback, $args);
_custom_breadcrumbs_taxonomy_set_breadcrumb($tids['tids'][0], NULL, TRUE, array(), $terms);
return $output;
}