Deletes a node type from the database.
$type: The machine-readable name of the node type to be deleted.
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();
}