function page_title_taxonomy_term_update in Page Title 7.2
Same name and namespace in other branches
- 8.2 page_title.module \page_title_taxonomy_term_update()
- 7 page_title.module \page_title_taxonomy_term_update()
Implement hook_taxonomy_term_update().
File
- ./
page_title.module, line 429 - Enhanced control over the page title (in the head tag).
Code
function page_title_taxonomy_term_update($term) {
if (user_access('set page title')) {
if (isset($term->page_title) && drupal_strlen(trim($term->page_title)) > 0) {
db_merge('page_title')
->key(array(
'type' => 'term',
'id' => $term->tid,
))
->fields(array(
'page_title' => $term->page_title,
))
->execute();
}
else {
page_title_taxonomy_term_delete($term);
}
}
}