function pathauto_field_attach_delete_bundle in Pathauto 7
Same name and namespace in other branches
- 6.2 pathauto.module \pathauto_field_attach_delete_bundle()
- 6 pathauto.module \pathauto_field_attach_delete_bundle()
Implements hook_field_attach_delete_bundle().
Respond to sub-types being deleted, their patterns can be removed.
File
- ./
pathauto.module, line 233 - Main file for the Pathauto module, which automatically generates aliases for content.
Code
function pathauto_field_attach_delete_bundle($entity_type, $bundle) {
$variables = db_select('variable', 'v')
->fields('v', array(
'name',
))
->condition('name', db_like("pathauto_{$entity_type}_{$bundle}_") . '%', 'LIKE')
->execute()
->fetchCol();
foreach ($variables as $variable) {
variable_del($variable);
}
}