function hook_node_revision_delete

Respond to deletion of a node revision.

This hook is invoked from node_revision_delete() after the revision has been removed from the node_revision table, and before field_attach_delete_revision() is called.

Parameters

$node: The node revision (node object) that is being deleted.

Related topics

1 invocation of hook_node_revision_delete()
node_revision_delete in modules/node/node.module
Deletes a node revision.

File

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

Code

function hook_node_revision_delete($node) {
    db_delete('mytable')->condition('vid', $node->vid)
        ->execute();
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.