API page: http://api.drupal.org/api/drupal/modules%21field%21field.api.php/functio...
Enter a descriptive title (above) relating to hook_field_attach_delete_bundle, then describe the problem you have found:
> $bundle: The bundle that was just deleted.
Is that a bundle machine name or an array? It's ambiguous.
Looking at the invoker, it seems to be a string:
// Clear bundle display settings.
variable_del('field_bundle_settings_' . $entity_type . '__' . $bundle);
// Let other modules act on deleting the bundle.
module_invoke_all('field_attach_delete_bundle', $entity_type, $bundle, $instances);
TBH the parameter could possibly do to be renamed $bundle_name, as that's used elsewhere in core when a bundle string is meant.
Comments
Comment #1
swentel commentedThis hook is gone now, see https://drupal.org/node/1964766
Comment #2
joachim commentedPresumably still on D7 though?
Comment #3
jhodgdonYes, still in 7, and I agree it's a string as it's being used as an array key. I think we should just change the docs to say "The name of the bundle...".
Comment #4
sandykadam commentedFixed the documentation.
Comment #5
jhodgdonSorry! I didn't mean that we should get rid of the "... that was just deleted" part of the documentation. Can you put that back in please?
Comment #6
sandykadam commented@jhodgdon Fixed the text in new patch
Comment #7
jhodgdonThanks! Looks good.
Comment #8
jhodgdonThanks again -- committed to 7.x.
Comment #9
sandykadam commentedThanks @jhodgdon