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