You are here

function pathauto_field_attach_delete_bundle in Pathauto 6.2

Same name and namespace in other branches
  1. 6 pathauto.module \pathauto_field_attach_delete_bundle()
  2. 7 pathauto.module \pathauto_field_attach_delete_bundle()

Implements hook_field_attach_delete_bundle().

Respond to sub-types being deleted, their patterns can be removed.

2 calls to pathauto_field_attach_delete_bundle()
pathauto_node_type in ./pathauto.module
Implements hook_node_type().
pathauto_taxonomy in ./pathauto.module
Implements hook_taxonomy().

File

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

Code

function pathauto_field_attach_delete_bundle($entity_type, $bundle) {
  $result = db_query("SELECT name FROM {variable} WHERE name LIKE '%s%%'", "pathauto_{$entity_type}_{$bundle}_");
  while ($variable = db_result($result)) {
    variable_del($variable);
  }
}