diff --git a/core/includes/theme.inc b/core/includes/theme.inc index 8bf25f9..09d119b 100644 --- a/core/includes/theme.inc +++ b/core/includes/theme.inc @@ -577,8 +577,10 @@ function template_preprocess_datetime_wrapper(&$variables) { * - attributes: (optional) Attributes for the anchor, or for the * tag used in its place if no 'url' is supplied. If element 'class' is * included, it must be an array of one or more class names. - * If the 'url' element is supplied, the entire link array is passed to - * Drupal::linkGenerator()->generate() as its parameters. + * If the 'url' element is supplied, any elements from the original link + * array, except 'title' and 'url', are being added to the options already + * present in the URL object, and then the resulting URL object is passed + * into \Drupal::linkGenerator()->generate(). * - attributes: A keyed array of attributes for the UL containing the * list of links. * - set_active_class: (optional) Whether each link should compare the diff --git a/core/modules/system/templates/links.html.twig b/core/modules/system/templates/links.html.twig index 8af75e9..bbbe924 100644 --- a/core/modules/system/templates/links.html.twig +++ b/core/modules/system/templates/links.html.twig @@ -9,9 +9,10 @@ * Each link will have the following elements: * - text: The link text. * - url: The link URL. If omitted, the 'text' element is shown as a plain - * text item in the links list. If this element is supplied, the entire - * link array is passed to Drupal::linkGenerator()->generate() as its - * parameters. + * text item in the links list. If this element is supplied, any elements + * from the original link array, except 'title' and 'url', are being added + * to the options already present in the URL object, and then the resulting + * URL object is passed into \Drupal::linkGenerator()->generate(). * - attributes: (optional) HTML attributes for the list item element. * - text_attributes: (optional) HTML attributes for the span element if no * 'url' is supplied. diff --git a/core/themes/classy/templates/navigation/links.html.twig b/core/themes/classy/templates/navigation/links.html.twig index b10e03d..181a4f3 100644 --- a/core/themes/classy/templates/navigation/links.html.twig +++ b/core/themes/classy/templates/navigation/links.html.twig @@ -9,9 +9,10 @@ * Each link will have the following elements: * - text: The link text. * - url: The link URL. If omitted, the 'text' element is shown as a plain - * text item in the links list. If this element is supplied, the entire - * link array is passed to Drupal::linkGenerator()->generate() as its - * parameters. + * text item in the links list. If this element is supplied, any elements + * from the original link array, except 'title' and 'url', are being added + * to the options already present in the URL object, and then the resulting + * URL object is passed into \Drupal::linkGenerator()->generate(). * - attributes: (optional) HTML attributes for the list item element. * - text_attributes: (optional) HTML attributes for the span element if no * 'url' is supplied. diff --git a/core/themes/stable/templates/navigation/links.html.twig b/core/themes/stable/templates/navigation/links.html.twig index b10e03d..181a4f3 100644 --- a/core/themes/stable/templates/navigation/links.html.twig +++ b/core/themes/stable/templates/navigation/links.html.twig @@ -9,9 +9,10 @@ * Each link will have the following elements: * - text: The link text. * - url: The link URL. If omitted, the 'text' element is shown as a plain - * text item in the links list. If this element is supplied, the entire - * link array is passed to Drupal::linkGenerator()->generate() as its - * parameters. + * text item in the links list. If this element is supplied, any elements + * from the original link array, except 'title' and 'url', are being added + * to the options already present in the URL object, and then the resulting + * URL object is passed into \Drupal::linkGenerator()->generate(). * - attributes: (optional) HTML attributes for the list item element. * - text_attributes: (optional) HTML attributes for the span element if no * 'url' is supplied.