You are here

function pathauto_node_type in Pathauto 6

Same name and namespace in other branches
  1. 6.2 pathauto.module \pathauto_node_type()

Implements hook_node_type().

File

./pathauto.module, line 312
Main file for the Pathauto module, which automatically generates aliases for content.

Code

function pathauto_node_type($op, $info) {
  switch ($op) {
    case 'update':
      if (!empty($info->old_type) && $info->old_type != $info->type) {
        pathauto_field_attach_rename_bundle('node', $info->old_type, $info->type);
      }
      break;
    case 'delete':
      pathauto_field_attach_delete_bundle('node', $info->type);
      break;
  }
}