function hook_field_attach_delete_bundle

Act on field_attach_delete_bundle.

This hook is invoked after the field module has performed the operation.


$entity_type: The type of entity; for example, 'node' or 'user'.

$bundle: The name of the bundle that was just deleted.

$instances: An array of all instances that existed for the bundle before it was deleted.

Related topics

1 function implements hook_field_attach_delete_bundle()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

field_test_field_attach_delete_bundle in drupal/modules/field/tests/
Implements hook_field_attach_delete_bundle().
1 invocation of hook_field_attach_delete_bundle()
field_attach_delete_bundle in drupal/modules/field/
Notify field.module the a bundle was deleted.


drupal/modules/field/field.api.php, line 1633
Hooks provided by the Field module.


function hook_field_attach_delete_bundle($entity_type, $bundle, $instances) {

  // Remove the extra weights variable information for this bundle.
  $extra_weights = variable_get('field_extra_weights', array());
  if (isset($extra_weights[$entity_type][$bundle])) {
    variable_set('field_extra_weights', $extra_weights);