function node_features_enable in Features 7
Implements hook_features_enable().
When a features module is enabled, modify any node types it provides so they can no longer be deleted manually through the content types UI.
Parameters
$module: Name of module that has been enabled.
File
- includes/
features.node.inc, line 148
Code
function node_features_enable($module) {
if ($default_types = features_get_default('node', $module)) {
foreach ($default_types as $type_name => $type_info) {
// Ensure the type exists.
if ($type_info = node_type_load($type_name)) {
$type_info->module = $module;
$type_info->custom = 0;
$type_info->modified = 0;
$type_info->locked = 1;
node_type_save($type_info);
}
}
}
}