You are here

function classy_preprocess_links__media_library_menu in Drupal 8

Same name and namespace in other branches
  1. 9 core/themes/classy/classy.theme \classy_preprocess_links__media_library_menu()
  2. 10 core/themes/classy/classy.theme \classy_preprocess_links__media_library_menu()

Implements hook_preprocess_links__media_library_menu().

This targets the menu of available media types in the media library's modal dialog.

@todo Do this in the relevant template once https://www.drupal.org/project/drupal/issues/3088856 is resolved.

File

core/themes/classy/classy.theme, line 20
Functions to support theming in the Classy theme.

Code

function classy_preprocess_links__media_library_menu(array &$variables) {
  foreach ($variables['links'] as &$link) {
    $link['link']['#options']['attributes']['class'][] = 'media-library-menu__link';
  }
}