You are here

function node_delete in Drupal 7

Same name and namespace in other branches
  1. 4 modules/node.module \node_delete()
  2. 5 modules/node/node.module \node_delete()
  3. 6 modules/node/node.module \node_delete()

Deletes a node.

Parameters

$nid: A node ID.

11 calls to node_delete()
CommentNodeChangesTestCase::testNodeDeletion in modules/comment/comment.test
Tests that comments are deleted with the node.
EntityCrudHookTestCase::testNodeHooks in modules/simpletest/tests/entity_crud_hook_test.test
Tests hook invocations for CRUD operations on nodes.
FileFieldWidgetTestCase::testPrivateFileSetting in modules/file/tests/file.test
Tests a file field with a "Private files" upload destination setting.
ListFieldUITestCase::testListAllowedValuesFloat in modules/field/modules/list/tests/list.test
List (float) : test 'allowed values' input.
ListFieldUITestCase::testListAllowedValuesInteger in modules/field/modules/list/tests/list.test
List (integer) : test 'allowed values' input.

... See full list

1 string reference to 'node_delete'
trigger_node_delete in modules/trigger/trigger.module
Implements hook_node_delete().

File

modules/node/node.module, line 1234
The core that allows content to be submitted to the site. Modules and scripts may programmatically submit nodes using the usual form API pattern.

Code

function node_delete($nid) {
  node_delete_multiple(array(
    $nid,
  ));
}