You are here

function node_type_delete in Drupal 5

Same name and namespace in other branches
  1. 6 modules/node/node.module \node_type_delete()
  2. 7 modules/node/node.module \node_type_delete()

Deletes a node type from the database.

Parameters

$type: The machine-readable name of the node type to be deleted.

2 calls to node_type_delete()
node_types_rebuild in modules/node/node.module
Resets the database cache of node types, and saves all new or non-modified module-defined node types to the database.
node_type_delete_confirm_submit in modules/node/content_types.inc
Process content type delete confirm submissions.

File

modules/node/node.module, line 356
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_type_delete($type) {
  db_query("DELETE FROM {node_type} WHERE type = '%s'", $type);
  $info = node_get_types('type', $type);
  module_invoke_all('node_type', 'delete', $info);
}