function taxonomy_page_title_alter in Page Title 8.2
Same name and namespace in other branches
- 6.2 modules/taxonomy.page_title.inc \taxonomy_page_title_alter()
- 7.2 modules/taxonomy.page_title.inc \taxonomy_page_title_alter()
Implements hook_page_title_alter().
File
- modules/
taxonomy.page_title.inc, line 12 - Taxonomy implementations of the page title hooks
Code
function taxonomy_page_title_alter(&$title) {
$menu_item = menu_get_item();
// If we're looking at a taxonomy term page, get the term title.
if (!strncmp($menu_item['path'], 'taxonomy/term/%', 15) && ($term = menu_get_object('taxonomy_term', 2)) && variable_get('page_title_vocab_' . $term->vocabulary_machine_name . '_showfield', 0) && ($term_title = page_title_load_title($term->tid, 'term'))) {
$title = $term_title;
}
}