You are here

function taxonomy_page_title_pattern_alter in Page Title 7.2

Same name and namespace in other branches
  1. 8.2 modules/taxonomy.page_title.inc \taxonomy_page_title_pattern_alter()
  2. 6.2 modules/taxonomy.page_title.inc \taxonomy_page_title_pattern_alter()

Implements hook_page_title_pattern_alter().

File

modules/taxonomy.page_title.inc, line 27
Taxonomy implementations of the page title hooks

Code

function taxonomy_page_title_pattern_alter(&$pattern, &$types) {
  $menu_item = menu_get_item();

  // Taxonomy Term Page
  if (!strncmp($menu_item['path'], 'taxonomy/term/%', 15) && ($term = menu_get_object('taxonomy_term', 2))) {
    $types['term'] = $term;
    $pattern = variable_get('page_title_vocab_' . $term->vocabulary_machine_name, '');
  }
}