hook_node_update

Versions
7
hook_node_update($node)

Respond to updates to a node.

This hook is invoked from node_save() after the node is updated in the node table in the database, after the type-specific hook_update() is invoked, and after field_attach_update() is called.

Parameters

$node The node that is being updated.

Related topics

Code

modules/node/node.api.php, line 485

<?php
function hook_node_update($node) {
  db_update('mytable')
    ->fields(array('extra' => $node->extra))
    ->condition('nid', $node->nid)
    ->execute();
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.