function file_field_delete_revision

Implements hook_field_delete_revision().

1 call to file_field_delete_revision()
image_field_delete_revision in drupal/core/modules/image/image.field.inc
Implements hook_field_delete_revision().

File

drupal/core/modules/file/file.field.inc, line 281
Field module functionality for the File module.

Code

function file_field_delete_revision($entity_type, $entity, $field, $instance, $langcode, &$items) {
  foreach ($items as $delta => $item) {

    // Decrement the file usage count by 1.
    file_usage()
      ->delete(file_load($item['fid']), 'file', $entity_type, $entity
      ->id());
  }
}