hook_node_revision_delete

  1. drupal
    1. 8
    2. 7
Versions
7 – 8 hook_node_revision_delete($node)

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

Code

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

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