1 file.field.inc file_field_delete_revision($entity_type, $entity, $field, $instance, $langcode, &$items)

Implements hook_field_delete_revision().

File

core/modules/file/file.field.inc, line 308
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.
    if ($file = file_load($item['fid'])) {
      file_usage_delete($file, 'file', $entity_type, $entity->id());
    }
  }
}