Skip to content
Snippets Groups Projects
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
No related branches found
No related tags found
2 merge requests!11185Issue #3477324 by andypost, alexpott: Fix usage of str_getcsv() and fgetcsv() for PHP 8.4,!9944Issue #3483353: Consider making the createCopy config action optionally fail...
Pipeline #221813 passed
...@@ -39,10 +39,10 @@ function umami_preprocess_field(&$variables, $hook) { ...@@ -39,10 +39,10 @@ function umami_preprocess_field(&$variables, $hook) {
$element['#field_name'] == 'field_recipe_category' || $element['#field_name'] == 'field_recipe_category' ||
$element['#field_name'] == 'field_tags' || $element['#field_name'] == 'field_tags' ||
$element['#field_name'] == 'field_difficulty') { $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') { if ($element['#view_mode'] == 'card' && $element['#field_name'] == 'field_difficulty') {
$variables['attributes']['class'] = 'umami-card__label-items'; $variables['attributes']['class'][] = 'umami-card__label-items';
} }
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment