Verified Commit cfeb5be4 authored by Alex Pott's avatar Alex Pott
Browse files

Issue #3454274 by markconroy, Lillian Bozeman: Do not override class in preprocess_field hook

(cherry picked from commit 238082ab)
parent 62d49255
Loading
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -39,10 +39,10 @@ function umami_preprocess_field(&$variables, $hook) {
      $element['#field_name'] == 'field_recipe_category' ||
      $element['#field_name'] == 'field_tags' ||
      $element['#field_name'] == 'field_difficulty') {
      $variables['attributes']['class'] = 'label-items';
      $variables['attributes']['class'][] = 'label-items';

      if ($element['#view_mode'] == 'card' && $element['#field_name'] == 'field_difficulty') {
        $variables['attributes']['class'] = 'umami-card__label-items';
        $variables['attributes']['class'][] = 'umami-card__label-items';
      }
    }
  }