function bartik_field__taxonomy_term_reference

Implements theme_field__field_type().

File

drupal/core/themes/bartik/bartik.theme, line 148
Functions to support theming in the Bartik theme.

Code

function bartik_field__taxonomy_term_reference($variables) {
  $output = '';

  // Render the label, if it's not hidden.
  if (!$variables['label_hidden']) {
    $output .= '<h3 class="field-label">' . $variables['label'] . ': </h3>';
  }

  // Render the items.
  $output .= $variables['element']['#label_display'] == 'inline' ? '<ul class="links inline">' : '<ul class="links">';
  foreach ($variables['items'] as $delta => $item) {
    $output .= '<li class="taxonomy-term-reference-' . $delta . '"' . $variables['item_attributes'][$delta] . '>' . drupal_render($item) . '</li>';
  }
  $output .= '</ul>';

  // Render the top-level DIV.
  $variables['attributes']['class'][] = 'clearfix';
  $output = '<div ' . $variables['attributes'] . '>' . $output . '</div>';
  return $output;
}