function claro_preprocess_menu_local_task__views_ui

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

Implements hook_preprocess_HOOK() for menu-local-task Views UI templates.

File

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

Code

function claro_preprocess_menu_local_task__views_ui(&$variables) {
    // Remove 'tabs__link' without adding a new class because it couldn't be used
    // reliably.
    // @see https://www.drupal.org/node/3051605
    $link_class_index = array_search('tabs__link', $variables['link']['#options']['attributes']['class']);
    if ($link_class_index !== FALSE) {
        unset($variables['link']['#options']['attributes']['class'][$link_class_index]);
    }
}

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