Skip to content

Commit 7b7c0e9

Browse files
authored
Merge pull request #208 from BeAPI/fix/issue-206-accessibility-helper
fix (helpers) free title vs content setting
2 parents 07daf89 + d35fe16 commit 7b7c0e9

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

inc/Helpers/Formatting/Link.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,12 @@ function get_acf_link( array $attributes, array $settings = [] ): string {
3838
$attributes,
3939
[
4040
'href' => $attributes['field']['url'],
41-
'title' => $attributes['field']['title'],
4241
'target' => $attributes['field']['target'],
4342
]
4443
);
4544

45+
$content = $attributes['field']['title'];
46+
4647
// Unset unused field params
4748
unset( $attributes['field'] );
4849

@@ -51,7 +52,7 @@ function get_acf_link( array $attributes, array $settings = [] ): string {
5152
$settings = wp_parse_args(
5253
$settings,
5354
[
54-
'content' => $attributes['title'],
55+
'content' => $content,
5556
]
5657
);
5758

@@ -144,7 +145,7 @@ function get_the_link( array $attributes, array $settings = [] ): string {
144145
$settings,
145146
[
146147
'before' => '',
147-
'content' => $attributes['title'],
148+
'content' => '',
148149
'new_window' => '',
149150
'after' => '',
150151
'escape' => [

0 commit comments

Comments
 (0)