diff --git a/core/includes/theme.inc b/core/includes/theme.inc index 09d119b..8b2cea4 100644 --- a/core/includes/theme.inc +++ b/core/includes/theme.inc @@ -572,15 +572,14 @@ function template_preprocess_datetime_wrapper(&$variables) { * is used as its CSS class. Each link should be itself an array, with the * following elements: * - title: The link text. - * - url: (optional) The url object to link to. If omitted, no a tag is - * printed out. + * - url: (optional) The URL object to link to. If omitted, no a tag is + * printed out. If the 'url' element is supplied, it is used to generate a + * link using \Drupal::linkGenerator()->generate(), after adding elements + * from the link array (except 'title' and 'url') to existing options on + * the URL object. * - 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, 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 bbbe924..56823db 100644 --- a/core/modules/system/templates/links.html.twig +++ b/core/modules/system/templates/links.html.twig @@ -9,10 +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, 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(). + * text item in the links list. If the 'url' element is supplied, it is used + * to generate a link using \Drupal::linkGenerator()->generate(), after + * adding elements from the link array (except 'title' and 'url') to + * existing options on the URL object. * - 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 181a4f3..539b750 100644 --- a/core/themes/classy/templates/navigation/links.html.twig +++ b/core/themes/classy/templates/navigation/links.html.twig @@ -9,10 +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, 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(). + * text item in the links list. If the 'url' element is supplied, it is used + * to generate a link using \Drupal::linkGenerator()->generate(), after + * adding elements from the link array (except 'title' and 'url') to + * existing options on the URL object. * - 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 181a4f3..539b750 100644 --- a/core/themes/stable/templates/navigation/links.html.twig +++ b/core/themes/stable/templates/navigation/links.html.twig @@ -9,10 +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, 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(). + * text item in the links list. If the 'url' element is supplied, it is used + * to generate a link using \Drupal::linkGenerator()->generate(), after + * adding elements from the link array (except 'title' and 'url') to + * existing options on the URL object. * - attributes: (optional) HTML attributes for the list item element. * - text_attributes: (optional) HTML attributes for the span element if no * 'url' is supplied.