You are here

function imce_process_files in IMCE 6

Same name and namespace in other branches
  1. 6.2 inc/imce.page.inc \imce_process_files()
  2. 7 inc/imce.page.inc \imce_process_files()

Do batch operations on files. Used by delete, resize, create thumbnail submissions.

3 calls to imce_process_files()
imce_delete_submit in inc/page.inc
Submit delete form.
imce_resize_submit in inc/page.inc
Submit resize form.
imce_thumb_submit in inc/page.inc
Submit thumbnail form.

File

inc/page.inc, line 363

Code

function imce_process_files($filenames, &$imce, $function, $args = array()) {
  $args = array_merge(array(
    '',
    &$imce,
  ), $args);
  $processed = array();
  foreach ($filenames as $filename) {
    $args[0] = $filename;
    if (call_user_func_array($function, $args)) {
      $processed[] = $filename;
    }
  }
  return $processed;
}