You are here

function media_watermark_process_multiple_images in Media watermark 7

Batch worker function.

Callback for batch_set().

Parameters

string $file_path: path to image file

array $form_state: array of form state

array $context: batch helper array

1 string reference to 'media_watermark_process_multiple_images'
media_watermark_prepare_batch in ./media_watermark.module
Batch operation: prepare batch to add watermarks to images.

File

./media_watermark.module, line 341
Watermark media module.

Code

function media_watermark_process_multiple_images($file_path, $form_state, &$context) {
  $context['results'][] = $file_path;

  // Optional message displayed under the progressbar.
  $context['message'] = t('Processing images "@title"', array(
    '@title' => $file_path,
  ));
  media_watermark_create_image($file_path, $form_state);
}