1 image.module image_field_delete_field($field)

Implements hook_field_delete_field().

File

core/modules/image/image.module, line 390
Exposes global functionality for creating image styles.

Code

function image_field_delete_field($field) {
  if ($field['type'] != 'image') {
    return;
  }

  // Remove the default image when the instance is deleted.
  $uri = $field['settings']['default_image'];
  if ($uri && file_exists($uri)) {
    file_unmanaged_delete($uri);
  }
}