diff --git a/core/includes/theme.inc b/core/includes/theme.inc index 723ae63..2ff894c 100644 --- a/core/includes/theme.inc +++ b/core/includes/theme.inc @@ -978,16 +978,13 @@ function template_preprocess_links(&$variables) { $variables['links'] = array(); foreach ($links as $key => $link) { - $item = array(); + $item = array('link_key' => $key); $link += array( 'ajax' => NULL, 'url' => NULL, ); - $li_attributes = array('class' => array()); - // Use the array key as class name. - $li_attributes['class'][] = drupal_html_class($key); - + $li_attributes = array(); $keys = ['title', 'url']; $link_element = array( '#type' => 'link', diff --git a/core/modules/system/src/Tests/Theme/FunctionsTest.php b/core/modules/system/src/Tests/Theme/FunctionsTest.php index 6433a64..f9a4a83 100644 --- a/core/modules/system/src/Tests/Theme/FunctionsTest.php +++ b/core/modules/system/src/Tests/Theme/FunctionsTest.php @@ -271,11 +271,11 @@ function testLinks() { $expected_links .= '