You are here

function plupload_element_process in Plupload integration 7

Same name and namespace in other branches
  1. 7.2 plupload.module \plupload_element_process()

Process callback (#process) for plupload form element.

1 string reference to 'plupload_element_process'
plupload_element_info in ./plupload.module
Implements hook_element_info().

File

./plupload.module, line 211
Implementation of plupload.module.

Code

function plupload_element_process($element) {

  // Start session if not there yet. We need session if we want security
  // tokens to work properly.
  if (!drupal_session_started()) {
    drupal_session_start();
  }
  if (!isset($element['#upload_validators'])) {
    $element['#upload_validators'] = array();
  }
  $element['#upload_validators'] += _plupload_default_upload_validators();
  return $element;
}