You are here

function clamav_imagefield_widget_alter in ClamAV 6

Implementation of our custom hook_FIELDNAME_alter for filefield widget.

File

./clamav.module, line 149
Integrate ClamAV to allow uploaded files to be scanned for viruses.

Code

function clamav_imagefield_widget_alter(&$field) {
  if (module_exists('imagefield') && variable_get('clamav_enable_element_imagefield_widget', TRUE)) {
    $field[0]['#upload_validators']['clamav_elements_filefield_validate'] = array();
  }
}