function file_field_delete_revision in Drupal 7
Implements hook_field_delete_revision().
1 call to file_field_delete_revision()
- image_field_delete_revision in modules/
image/ image.field.inc - Implements hook_field_delete_revision().
File
- modules/
file/ file.field.inc, line 324 - Field module functionality for the File module.
Code
function file_field_delete_revision($entity_type, $entity, $field, $instance, $langcode, &$items) {
list($id, $vid, $bundle) = entity_extract_ids($entity_type, $entity);
foreach ($items as $delta => $item) {
// Decrement the file usage count by 1 and delete the file if possible.
if (file_field_delete_file($item, $field, $entity_type, $id)) {
$items[$delta] = NULL;
}
}
}