function seven_preprocess_fieldset__media_library_widget in Drupal 10
Same name and namespace in other branches
- 8 core/themes/seven/seven.theme \seven_preprocess_fieldset__media_library_widget()
- 9 core/themes/seven/seven.theme \seven_preprocess_fieldset__media_library_widget()
@todo Remove this when https://www.drupal.org/project/drupal/issues/2999549 lands.
See also
\Drupal\media_library\Plugin\Field\FieldWidget\MediaLibraryWidget::formElement()
File
- core/
themes/ seven/ seven.theme, line 329 - Functions to support theming in the Seven theme.
Code
function seven_preprocess_fieldset__media_library_widget(array &$variables) {
if (isset($variables['prefix']['weight_toggle'])) {
$variables['prefix']['weight_toggle']['#attributes']['class'][] = 'media-library-widget__toggle-weight';
}
if (isset($variables['suffix']['open_button'])) {
$variables['suffix']['open_button']['#attributes']['class'][] = 'media-library-open-button';
}
}