From 238082ab8283992195c7d7a841ff673bc55006da Mon Sep 17 00:00:00 2001 From: Alex Pott Date: Thu, 11 Jul 2024 11:51:54 +0100 Subject: [PATCH] Issue #3454274 by markconroy, Lillian Bozeman: Do not override class in preprocess_field hook --- core/profiles/demo_umami/themes/umami/umami.theme | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/profiles/demo_umami/themes/umami/umami.theme b/core/profiles/demo_umami/themes/umami/umami.theme index 1181242b7cd..ac2bedd9406 100644 --- a/core/profiles/demo_umami/themes/umami/umami.theme +++ b/core/profiles/demo_umami/themes/umami/umami.theme @@ -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'; } } }