Skip to content

Commit

Permalink
Issue #2107231 by valderama: Fix documentation for hook_delete()
Browse files Browse the repository at this point in the history
  • Loading branch information
jhodgdon-drp committed Jan 30, 2014
1 parent 7f3e670 commit 5575962
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions modules/node/node.api.php
Original file line number Diff line number Diff line change
Expand Up @@ -1033,9 +1033,17 @@ function hook_node_type_delete($info) {
* This hook is invoked only on the module that defines the node's content type
* (use hook_node_delete() to respond to all node deletions).
*
* This hook is invoked from node_delete_multiple() after the node has been
* removed from the node table in the database, before hook_node_delete() is
* invoked, and before field_attach_delete() is called.
* This hook is invoked from node_delete_multiple() before hook_node_delete()
* is invoked and before field_attach_delete() is called.
*
* Note that when this hook is invoked, the changes have not yet been written
* to the database, because a database transaction is still in progress. The
* transaction is not finalized until the delete operation is entirely
* completed and node_delete_multiple() goes out of scope. You should not rely
* on data in the database at this time as it is not updated yet. You should
* also note that any write/update database queries executed from this hook are
* also not committed immediately. Check node_delete_multiple() and
* db_transaction() for more info.
*
* @param $node
* The node that is being deleted.
Expand Down

0 comments on commit 5575962

Please sign in to comment.