1 node.api.php hook_node_delete(Node $node)

Respond to node deletion.

This hook is invoked from node_delete_multiple() after field_attach_delete() has been called and after the node has been removed from the database.

Parameters

Node $node: The node that has been deleted.

See also

hook_node_predelete()

node_delete_multiple()

Related topics

File

core/modules/node/node.api.php, line 428
Hooks provided by the Node module.

Code

function hook_node_delete(Node $node) {
  backdrop_set_message(t('Node: @title has been deleted', array('@title' => $node->title)));
}