You are here

function theme_video_widget in Video 7.2

Same name and namespace in other branches
  1. 7 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 16
Theme related functions for the Video module.

Code

function theme_video_widget(array $variables) {
  $element = $variables['element'];
  $output = '<div class="video-widget form-managed-file clearfix">';
  if (isset($element['preview'])) {
    $output .= drupal_render($element['preview']);
  }
  $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;
}