function gin_lb_preprocess_media_library_item in Gin Layout Builder 1.0.x
Implements hook_preprocess_media_library_item__widget().
This targets each media item selected in an entity reference field.
File
- ./
gin_lb.module, line 463 - Provides hooks for gin_lb module.
Code
function gin_lb_preprocess_media_library_item(array &$variables) {
if (gin_lb_is_valid_theme() === FALSE) {
return;
}
$variables['content']['remove_button']['#attributes']['class'][] = 'media-library-item__remove';
$variables['content']['remove_button']['#attributes']['class'][] = 'icon-link';
}