function node_features_revert in Features 7
Same name and namespace in other branches
- 6 includes/features.node.inc \node_features_revert()
- 7.2 includes/features.node.inc \node_features_revert()
Implements hook_features_revert().
Parameters
$module: name of module to revert content for
File
- includes/
features.node.inc, line 100
Code
function node_features_revert($module = NULL) {
if ($default_types = features_get_default('node', $module)) {
foreach ($default_types as $type_name => $type_info) {
// Delete node types
// We don't use node_type_delete() because we do not actually
// want to delete the node type (and invoke hook_node_type()).
// This can lead to bad consequences like CCK deleting field
// storage in the DB.
db_delete('node_type')
->condition('type', $type_name)
->execute();
}
node_types_rebuild();
menu_rebuild();
}
}