You are here

function minisite_field_delete_revision in Mini site 7

Implements hook_field_delete_revision().

File

includes/minisite.field.inc, line 193
Minisite field.

Code

function minisite_field_delete_revision($entity_type, $entity, $field, $instance, $langcode, &$items) {
  list($id, , ) = 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 (minisite_file_field_delete_file($item, $field, $entity_type, $id)) {
      $items[$delta] = NULL;
    }
  }
}