diff --git a/core/themes/seven/seven.theme b/core/themes/seven/seven.theme index 2dbf7eb..3e79d0f 100644 --- a/core/themes/seven/seven.theme +++ b/core/themes/seven/seven.theme @@ -109,20 +109,23 @@ function seven_menu_local_task($variables) { // Add text to indicate active tab for non-visual users. $active = '' . t('(active tab)') . ''; - // If the link does not contain HTML already, check_plain() it now. + // If the link does not contain HTML already, String::checkPlain() it now. // After we set 'html'=TRUE the link will not be sanitized by l(). if (empty($link['localized_options']['html'])) { - $link['title'] = check_plain($link['title']); + $link['title'] = String::checkPlain($link['title']); } $link['localized_options']['html'] = TRUE; $link_text = t('!local-task-title!active', array('!local-task-title' => $link['title'], '!active' => $active)); } - $class = 'tabs__tab'; - if(!empty($variables['element']['#active'])) { - $class .= ' active'; + if (!empty($link['href'])) { + // @todo - remove this once all pages are converted to routes. + $a_tag = l($link_text, $link['href'], $link['localized_options']); + } + else { + $a_tag = \Drupal::l($link_text, $link['route_name'], $link['route_parameters'], $link['localized_options']); } - return '
  • ' . l($link_text, $link['href'], $link['localized_options']) . '
  • '; + return '' . $a_tag . ''; } /**