You are here

function theme_video_fields in Video 6.2

Same name and namespace in other branches
  1. 6 video.module \theme_video_fields()

Takes an associative array of $fields with 'title' and 'body' keys and outputs the HTML. This theme function allows the same HTML code to generate all the custom and metadata fields.

Parameters

$fields: array with 'title' and 'body' keys

Return value

string of content to display

1 theme call to theme_video_fields()
theme_video_metadata in plugins/video_optmetadata/video_optmetadata.module
Display optional metadata (Video and Audio bitrate,..) on the view page.

File

./video.module, line 1246
video.module

Code

function theme_video_fields($fields) {
  $output = '';
  $odd_even = 'odd';
  foreach ($fields as $field) {
    $output .= "<div class=\"{$odd_even}\"><b>" . check_plain($field['title']) . '</b> ' . check_plain($field['body']) . "</div>\n";
    $odd_even = $odd_even == 'odd' ? 'even' : 'odd';

    //Always switch its value.
  }
  return $output;
}