function node_type_delete
Deletes a node type from the database.
Parameters
$type: The machine-readable name of the node type to be deleted.
1 call to node_type_delete()
- node_type_delete_confirm_submit in modules/
node/ content_types.inc - Process content type delete confirm submissions.
File
-
modules/
node/ node.module, line 652
Code
function node_type_delete($type) {
$info = node_type_get_type($type);
db_delete('node_type')->condition('type', $type)
->execute();
field_attach_delete_bundle('node', $type);
module_invoke_all('node_type_delete', $info);
// Clear the node type cache.
node_type_cache_reset();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.