node_type_delete
function node_type_delete
node_type_delete($type)
Deletes a node type from the database.
Parameters
$type: The machine-readable name of the node type to be deleted.
File
- modules/node/node.module, line 652
- 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) { $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(); }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/modules!node!node.module/function/node_type_delete/7.x