function media_entity_delete in D7 Media 7
Implements hook_entity_delete().
File
- includes/
media.filter.inc, line 176 - Functions related to the WYSIWYG editor and the media input filter.
Code
function media_entity_delete($entity, $type) {
list($entity_id) = entity_extract_ids($type, $entity);
db_delete('file_usage')
->condition('module', 'media')
->condition('type', $type)
->condition('id', $entity_id)
->execute();
}