Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
link
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
link
Commits
7d051bb1
Commit
7d051bb1
authored
8 months ago
by
dqd
Browse files
Options
Downloads
Patches
Plain Diff
Update file link.module
parent
4a31314c
No related branches found
No related tags found
1 merge request
!8
Update file link.module
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
link.module
+13
-0
13 additions, 0 deletions
link.module
with
13 additions
and
0 deletions
link.module
+
13
−
0
View file @
7d051bb1
...
...
@@ -1193,6 +1193,19 @@ function link_field_process($element, $form_state, $complete_form) {
return
$element
;
}
/**
* Implements template_preprocess_form_element_label().
*/
function
link_preprocess_form_element_label
(
&
$vars
)
{
$element
=
&
$vars
[
'element'
];
if
(
'link_field'
==
$element
[
'#type'
])
{
if
(
isset
(
$element
[
'url'
])
&&
!
isset
(
$element
[
'title'
]))
{
// Link label directly to the URL field.
$element
[
'#id'
]
.
=
'-url'
;
}
}
}
/**
* Implements hook_field_formatter_info().
*/
...
...
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