You are here

function video_field_delete_revision in Video 7.2

Same name and namespace in other branches
  1. 7 video.field.inc \video_field_delete_revision()

Implements hook_field_delete_revision().

File

./video.field.inc, line 548
Implement a video field, based on the file module's file field.

Code

function video_field_delete_revision($entity_type, $entity, $field, $instance, $langcode, &$items) {

  // Deregister the thumbnails in file_usage
  $thumbnails = _video_field_get_all_thumbnails($field, $items);
  file_field_delete_revision($entity_type, $entity, $field, $instance, $langcode, $thumbnails);

  // Deregister the converted files in file_usage
  $converted = _video_field_get_all_converted($items);
  file_field_delete_revision($entity_type, $entity, $field, $instance, $langcode, $converted);
  file_field_delete_revision($entity_type, $entity, $field, $instance, $langcode, $items);
}