You are here

function page_title_taxonomy_term_insert in Page Title 7.2

Same name and namespace in other branches
  1. 8.2 page_title.module \page_title_taxonomy_term_insert()
  2. 7 page_title.module \page_title_taxonomy_term_insert()

Implement hook_taxonomy_term_insert().

File

./page_title.module, line 452
Enhanced control over the page title (in the head tag).

Code

function page_title_taxonomy_term_insert($term) {
  if (user_access('set page title') && isset($term->page_title) && drupal_strlen(trim($term->page_title)) > 0) {
    db_insert('page_title')
      ->fields(array(
      'type' => 'term',
      'id' => $term->tid,
      'page_title' => $term->page_title,
    ))
      ->execute();
  }
}