function auto_nodetitle_node_type in Automatic Nodetitles 5
Same name and namespace in other branches
- 6 auto_nodetitle.module \auto_nodetitle_node_type()
Implementation of hook_node_type().
File
- ./
auto_nodetitle.module, line 230 - Allows hiding of the node title field and automatic title creation
Code
function auto_nodetitle_node_type($op, $info) {
switch ($op) {
case 'delete':
variable_del('ant_' . $info->type);
variable_del('ant_pattern_' . $info->type);
variable_del('ant_php_' . $info->type);
break;
case 'update':
if (!empty($info->old_type) && $info->old_type != $info->type) {
variable_set('ant_' . $info->type, auto_nodetitle_get_setting($info->old_type));
variable_set('ant_pattern_' . $info->type, variable_get('ant_pattern_' . $info->old_type, ''));
variable_set('ant_php_' . $info->type, variable_get('ant_php_' . $info->old_type, ''));
variable_del('ant_' . $info->old_type);
variable_del('ant_pattern_' . $info->old_type);
variable_del('ant_php_' . $info->old_type);
}
break;
}
}