You are here

function workbench_media_add in Workbench Media 7

Form callback for adding media.

Uses Media's own upload form and adds a submit function.

A wrapper function is used because: 1. Using hook_form_alter() would require fragile logic to figure out when to alter the upload form. 2. We may want to extend the media form functionality in the future.

1 string reference to 'workbench_media_add'
workbench_media_menu in ./workbench_media.module
Implements hook_menu().

File

./workbench_media.module, line 75
Workbench Media module file for workbench-specific media features.

Code

function workbench_media_add($form, &$form_state) {
  $form = drupal_get_form('media_add_upload', $form, $form_state);
  $form['#submit'][] = 'workbench_media_add_submit';
  return $form;
}