You are here

function theme_video_widget in Video 7

Same name and namespace in other branches
  1. 7.2 video.theme.inc \theme_video_widget()

Returns HTML for an video field widget.

Parameters

$variables: An associative array containing:

  • element: A render element representing the image field widget.

File

./video.theme.inc, line 12

Code

function theme_video_widget($variables) {
  $element = $variables['element'];
  $output = '';
  $output .= '<div class="video-widget form-managed-file clearfix">';
  if (isset($element['preview'])) {
    $output .= '<div class="video-preview">';
    $output .= drupal_render($element['preview']);
    $output .= '</div>';
  }
  $output .= '<div class="video-widget-data">';
  if ($element['fid']['#value'] != 0) {
    $element['filename']['#markup'] .= ' <span class="file-size">(' . format_size($element['#file']->filesize) . ')</span> ';
  }
  $output .= drupal_render_children($element);
  $output .= '</div>';
  $output .= '</div>';
  return $output;
}