You are here

function focal_point_form_file_entity_add_upload_alter in Focal Point 7

Implements hook_form_FORM_ID_alter().

File

./focal_point.module, line 141

Code

function focal_point_form_file_entity_add_upload_alter(&$form, &$form_state) {

  // Add focal point to the file entity edit form used by the media browser.
  if (isset($form_state['step']) && $form_state['step'] == 4) {
    $fid = isset($form_state['values']['upload']) ? $form_state['values']['upload'] : $form_state['storage']['upload'];
    $file = file_load($fid);
    _focal_point_form_append_focal_point_preview($form, $file);
  }
}