file_field_delete_revision
function file_field_delete_revision
file_field_delete_revision($entity_type, $entity, $field, $instance, $langcode, &$items)
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; } } }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/modules!file!file.field.inc/function/file_field_delete_revision/7.x