function claro_preprocess_media_library_item__widget

Same name and namespace in other branches
  1. 8.9.x core/themes/claro/claro.theme \claro_preprocess_media_library_item__widget()
  2. 10 core/themes/claro/claro.theme \claro_preprocess_media_library_item__widget()
  3. 11.x core/themes/claro/claro.theme \claro_preprocess_media_library_item__widget()

Implements hook_preprocess_media_library_item__widget().

This targets each media item selected in an entity reference field.

File

core/themes/claro/claro.theme, line 1418

Code

function claro_preprocess_media_library_item__widget(array &$variables) {
    $variables['content']['remove_button']['#attributes']['class'][] = 'media-library-item__remove';
    $variables['content']['remove_button']['#attributes']['class'][] = 'icon-link';
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.