You are here

function emthumb_widget_upload_button_submit in Embedded Media Field 6.3

Same name and namespace in other branches
  1. 6 contrib/emthumb/emthumb.module \emthumb_widget_upload_button_submit()
  2. 6.2 contrib/emthumb/emthumb.module \emthumb_widget_upload_button_submit()
1 string reference to 'emthumb_widget_upload_button_submit'
emthumb_widget_element_process in contrib/emthumb/emthumb.module
Process our emthumb element.

File

contrib/emthumb/emthumb.module, line 270
Allows for custom thumbnail overrides to Embedded Media Field.

Code

function emthumb_widget_upload_button_submit($form, &$form_state) {
  $delta = substr($form_state['clicked_button']['#name'], strrpos($form_state['clicked_button']['#name'], '_', -(strlen('_upload') + 1)) + 1, -strlen('_upload'));
  $field_name = substr($form_state['clicked_button']['#name'], strlen('emthumb_'), -strlen("_{$delta}_upload"));
  $field = $form['#field_info'][$field_name];
  $upload_op = 'emthumb_' . $field_name . '_' . $delta . '_upload';
  _emthumb_file_upload($form_state, $field_name, $field, $delta, $upload_op);
}