You are here

function theme_imageeditor_widget in Image Editor 6

2 theme calls to theme_imageeditor_widget()
imageeditor_filefield_source_imageeditor_process in ./imageeditor.module
imageeditor_process_element in ./imageeditor.module
Process function for pixlr-enabled fields.

File

./imageeditor.module, line 453
Allows online editing of images using different image editing services.

Code

function theme_imageeditor_widget($status, $widget, $field_name, $delta, $filepath = '') {
  if ($status == 'existing') {
    $html = '<div class="imageeditor imageeditor-existing">';
    $html .= '<input type="hidden" class="field-name" value="' . $field_name . '">';
    $html .= '<input type="hidden" class="delta" value="' . $delta . '">';
    $html .= '<input type="hidden" class="filepath" value="' . $filepath . '">';
    $html .= '<input type="hidden" class="url" value="' . url($filepath, array(
      'absolute' => TRUE,
    )) . '">';
    $html .= theme('imageeditor_widget_editors', $status, $widget);
    $html .= theme('imageeditor_widget_uploaders', $widget);
    $html .= '</div>';
  }
  elseif ($status == 'new') {
    $html = '<div class="imageeditor imageeditor-new">';
    $html .= '<input type="hidden" class="field-name" value="' . $field_name . '">';
    $html .= '<input type="hidden" class="delta" value="' . $delta . '">';
    $html .= theme('imageeditor_widget_editors', $status, $widget);
    $html .= '</div>';
  }
  return $html;
}