function hook_delete


Error message

User warning: The following module is missing from the file system: theme/theme. For information about how to fix this, see the documentation page. in _drupal_trigger_error_with_delayed_logging() (line 1156 of /var/www/html/elmsln_community/
cis7 node.api.php hook_delete($node)
cle7 node.api.php hook_delete($node)
elmsmedia7 node.api.php hook_delete($node)
icor7 node.api.php hook_delete($node)
meedjum_blog7 node.api.php hook_delete($node)
mooc7 node.api.php hook_delete($node)

Respond to node deletion.

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.


$node: The node that is being deleted.

Related topics

166 functions implement hook_delete()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

accessibility_test_delete in sites/all/modules/ulmus/accessibility/accessibility.module
Deletes an accessibility test.
accessibility_test_form_submit_delete in sites/all/modules/ulmus/accessibility/accessibility.module
Form API submit callback for the delete button.
actions_delete in includes/
Deletes a single action from the database.
admin_menu_menu_link_delete in sites/all/modules/ulmus/admin_menu/admin_menu.module
Implements hook_menu_link_delete().
backup_migrate_crud_ui_delete in sites/all/modules/ulmus/backup_migrate/includes/
Page callback to delete an item.

... See full list

4 invocations of hook_delete()
EntityAPIController::delete in sites/all/modules/ulmus/entity/includes/
Implements EntityAPIControllerInterface.
field_attach_delete in modules/field/
Delete field data for an existing entity. This deletes all revisions of field data for the entity.
field_purge_data in modules/field/
Purges the field data for a single field on a single pseudo-entity.
node_delete_multiple in modules/node/node.module
Deletes multiple nodes.


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


function hook_delete($node) {
  db_delete('mytable')->condition('nid', $node->nid)->execute();