function content_profile_node_type in Content Profile 6
Implementation of hook_node_type(). Rename or delete the settings variable if a type changes.
File
- ./
content_profile.module, line 228
Code
function content_profile_node_type($op, $info) {
switch ($op) {
case 'delete':
variable_del('content_profile_use_' . $info->type);
variable_del('content_profile_' . $info->type);
break;
case 'update':
if (!empty($info->old_type) && $info->old_type != $info->type) {
if (is_content_profile($info->old_type)) {
$settings = variable_get('content_profile_' . $info->old_type, array());
variable_del('content_profile_use_' . $info->old_type);
variable_del('content_profile_' . $info->old_type);
variable_set('content_profile_use_' . $info->type, 1);
variable_set('content_profile_' . $info->type, $settings);
}
}
break;
}
}