function og_node_type in Organic groups 6
Same name and namespace in other branches
- 5.8 og.module \og_node_type()
- 5 og.module \og_node_type()
- 5.3 og.module \og_node_type()
- 5.7 og.module \og_node_type()
- 6.2 og.module \og_node_type()
An implementation of hook_node_type. Automatically update admin preferences when node type is renamed or removed.
File
- ./
og.module, line 2312
Code
function og_node_type($op, $info) {
switch ($op) {
case 'delete':
variable_del('og_content_type_usage_' . $info->type);
break;
case 'update':
$usage = variable_get('og_content_type_usage_' . $info->type, 'omitted');
variable_set('og_content_type_usage_' . $info->type, $usage);
if (isset($info->old_type)) {
variable_del('og_content_type_usage_' . $info->old_type);
}
}
}