You are here

function manualcrop_file_presave in Manual Crop 7

Implements hook_file_presave().

File

./manualcrop.module, line 530

Code

function manualcrop_file_presave($file) {
  if (!module_exists('file_entity_revisions')) {
    return;
  }

  // If there will be a new revision, load the manualcrop data so we can write it
  // once the new revision is set.
  if (!empty($file->vid) && !empty($file->new_revision)) {
    $file->manualcrop_data = manualcrop_load_crop_selection($file->uri);
  }
}