Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
drupal
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
drupal
Commits
61dd88e8
Commit
61dd88e8
authored
15 years ago
by
Angie Byron
Browse files
Options
Downloads
Patches
Plain Diff
#364219
follow-up by brandonojc: Commit missing hunk from last patch.
parent
b5729a61
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!7452
Issue #1797438. HTML5 validation is preventing form submit and not fully...
,
!789
Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
includes/theme.inc
+22
-2
22 additions, 2 deletions
includes/theme.inc
with
22 additions
and
2 deletions
includes/theme.inc
+
22
−
2
View file @
61dd88e8
...
...
@@ -1383,17 +1383,37 @@ function theme_status_messages($display = NULL) {
* - href: the link URL. If omitted, the 'title' is shown as a plain text item in the links list.
* - html: (optional) set this to TRUE if 'title' is HTML so it will be escaped.
* Array items are passed on to the l() function's $options parameter when creating the link.
* @param $heading
* An optional keyed array for a heading to precede the links:
* - text: the heading text
* - level: the heading level (e.g. 'h2', 'h3')
* - class: (optional) space-separated classes for the heading
* Headings should be used on navigation menus and any list of links that
* consistently appears on multiple pages. To make the heading invisible
* use class => 'element-invisible'. Do not use 'display:none', which
* removes it from screen-readers and assistive technology. Headings allow
* screen-reader and keyboard only users to navigate to or skip the links.
* See http://juicystudio.com/article/screen-readers-display-none.php
* and http://www.w3.org/TR/WCAG-TECHS/H42.html for more information.
* @param $attributes
* A keyed array of attributes.
* @return
* A string containing an unordered list of links.
*/
function
theme_links
(
$links
,
$attributes
=
array
(
'class'
=>
array
(
'links'
)))
{
function
theme_links
(
$links
,
$heading
=
array
(),
$attributes
=
array
(
'class'
=>
array
(
'links'
)))
{
global
$language
;
$output
=
''
;
if
(
count
(
$links
)
>
0
)
{
$output
=
'<ul'
.
drupal_attributes
(
$attributes
)
.
'>'
;
$output
=
''
;
if
(
!
empty
(
$heading
[
'text'
])
&&
!
empty
(
$heading
[
'level'
]))
{
$output
.
=
'<'
.
$heading
[
'level'
]
.
(
!
empty
(
$heading
[
'class'
])
?
drupal_attributes
(
array
(
'class'
=>
$heading
[
'class'
]))
:
''
)
.
'>'
;
$output
.
=
check_plain
(
$heading
[
'text'
]);
$output
.
=
'</'
.
$heading
[
'level'
]
.
'>'
;
}
$output
.
=
'<ul'
.
drupal_attributes
(
$attributes
)
.
'>'
;
$num_links
=
count
(
$links
);
$i
=
1
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment