function og_node_type in Organic groups 6.2
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 og.module \og_node_type()
Implementation of hook_node_type()
Automatically update admin preferences when node type is renamed or removed.
File
- ./
og.module, line 2397 - Code for the Organic Groups module.
Code
function og_node_type($op, $info) {
switch ($op) {
case 'delete':
variable_del('og_content_type_usage_' . $info->type);
variable_del('og_max_groups_' . $info->type);
break;
case 'update':
if (isset($info->old_type)) {
variable_del('og_content_type_usage_' . $info->old_type);
}
}
}