You are here

function imagefield_crop_elements in Imagefield Crop 6

Implementation of hook_elements().

File

./imagefield_crop.module, line 71

Code

function imagefield_crop_elements() {
  $elements = array();
  $elements['imagefield_crop_widget'] = array(
    // Indicate to FormAPI that this element needs processing and is not simply a render element.
    '#input' => TRUE,
    '#process' => array(
      'filefield_widget_process',
      'imagefield_widget_process',
      'imagefield_crop_widget_process',
    ),
    '#value_callback' => 'imagefield_crop_widget_value',
    '#element_validate' => array(
      'filefield_widget_validate',
      'imagefield_widget_validate',
      'imagefield_crop_widget_validate',
    ),
    '#description' => t('Changes made to the attachments are not permanent until you save this post.'),
  );
  return $elements;
}