node_type_delete

Versions
5 – 7
node_type_delete($type)

Deletes a node type from the database.

Parameters

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

▾ 2 functions call 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.

Code

modules/node/node.module, line 356

<?php
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);
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.