You are here

function location_addanother_node_type in Location 5.3

Same name and namespace in other branches
  1. 6.3 contrib/location_addanother/location_addanother.module \location_addanother_node_type()
  2. 7.4 contrib/location_addanother/location_addanother.module \location_addanother_node_type()

Implementation of hook_node_type(). Synchronize our settings.

File

contrib/location_addanother/location_addanother.module, line 101
"Add location from node view" functionality. Split from main location.module in version 3.

Code

function location_addanother_node_type($op, $info) {
  switch ($op) {
    case 'delete':
      variable_del('location_addanother_' . $info->type);
      break;
    case 'update':
      if (!empty($info->old_type) && $info->old_type != $info->type) {
        $setting = variable_get('location_addanother_' . $info->old_type, 0);
        variable_del('location_addanother_' . $info->old_type);
        variable_set('location_addanother_' . $info->type, $setting);
      }
      break;
  }
}