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.
node_type_delete_confirm_submit in modules/node/content_types.inc
Process content type delete confirm submissions.

Code

modules/node/node.module, line 634

<?php
function node_type_delete($type) {
  $info = node_type_get_type($type);
  db_delete('node_type')
    ->condition('type', $type)
    ->execute();
  module_invoke_all('node_type_delete', $info);

  // Clear the node type cache.
  drupal_static_reset('_node_types_build');
}
?>
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.