function theme_views_view_fields

Returns HTML for multiple views fields.

Parameters

$variables: An associative array containing:

  • fields: An array of field objects. Each field object contains:

    • separator: A string that separates the fields.
    • wrapper_suffix: A string added to the beginning of the fields.
    • label_html: An HTML string that labels the fields.
    • content: The fields.
    • wrapper_suffix: A string added to the end of the fields.

See also

template_preprocess_views_view_fields()

File

drupal/core/modules/views/views.theme.inc, line 335
Preprocessors and helper functions to make theming easier.

Code

function theme_views_view_fields($variables) {
  $fields = $variables['fields'];
  $output = '';
  foreach ($fields as $id => $field) {
    if (!empty($field->separator)) {
      $output .= $field->separator;
    }
    $output .= $field->wrapper_prefix;
    $output .= $field->label_html;
    $output .= $field->content;
    $output .= $field->wrapper_suffix;
  }
  return $output;
}