function file_field_delete_revision

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

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;
        }
    }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.