You are here

function flag_entity_delete in Flag 7.2

Same name and namespace in other branches
  1. 7.3 flag.module \flag_entity_delete()

Implements hook_entity_delete().

File

./flag.module, line 677
The Flag module.

Code

function flag_entity_delete($entity, $type) {

  // Node and user flags handle things through the entity type delete hooks.
  // @todo: make this configurable in the flag type definition?
  if ($type == 'node' || $type == 'user') {
    return;
  }
  list($id) = entity_extract_ids($type, $entity);
  _flag_content_delete($type, $id);
}