You are here

function imce_create_thumbnails in IMCE 7

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

Create all selected thumbnails.

1 call to imce_create_thumbnails()
imce_upload_submit in inc/imce.page.inc
Submit upload form.
1 string reference to 'imce_create_thumbnails'
imce_thumb_submit in inc/imce.page.inc
Submit thumbnail form.

File

inc/imce.page.inc, line 495
Implements the file browser.

Code

function imce_create_thumbnails($filename, &$imce, $values) {
  $created = array();
  foreach ($imce['thumbnails'] as $thumbnail) {
    if ($values[$thumbnail['name']] && imce_create_thumbnail($filename, $imce, $thumbnail)) {
      $created[] = $thumbnail['name'];
    }
  }
  if (!empty($created)) {
    drupal_set_message(t('Thumbnail creation (%thumbnames) successful for %filename.', array(
      '%thumbnames' => implode(', ', $created),
      '%filename' => utf8_encode($filename),
    )));
  }
  return $created;
}