By grimreaper on
Change record status:
Published (View all published change records)
Project:
Introduced in branch:
11.4.x
Introduced in version:
11.4.0
Issue links:
Description:
A few theme hooks used an item_attributes property instead of using the standard attributes.
To avoid special case handling, those theme hooks now use attributes.
Before:
$elements[$delta] = [
'#theme' => 'image_formatter',
'#item_attributes' => [
'loading' => $this->getSetting('image_loading')['attribute'],
],
...
];
$elements[$delta] = [
'#theme' => 'responsive_image_formatter',
'#item_attributes' => $item_attributes,
...
];
After:
$elements[$delta] = [
'#theme' => 'image_formatter',
'#attributes' => [
'loading' => $this->getSetting('image_loading')['attribute'],
],
...
];
$elements[$delta] = [
'#theme' => 'responsive_image_formatter',
'#attributes' => $item_attributes, // Variable $item_attributes not renamed for easier comparison.
...
];
Impacts:
Module developers
Themers