Make WordPress Core

Opened 3 years ago

Closed 3 years ago

#54209 closed defect (bug) (fixed)

Twenty Twenty-One: footer links lack closing span tag

Reported by: sabernhardt's profile sabernhardt Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: 5.9 Priority: normal
Severity: normal Version:
Component: Bundled Theme Keywords: has-patch
Focuses: Cc:

Description

Footer navigation menus specify wrapping each menu item in a span tag, using the link_before and link_after arguments.

However, when the link_after value is emptied to reset any description markup, that also removes the closing tag within footer links.

Attachments (1)

54209.patch (822 bytes) - added by sabernhardt 3 years ago.

Download all attachments as: .zip

Change History (5)

@sabernhardt
3 years ago

#1 @sabernhardt
3 years ago

  • Keywords has-patch added

54209.patch simply checks whether the link_after value is (only) the closing span tag before setting it to empty.

Another approach might accommodate custom arguments, but this could take care of the standard footer menu argument.

#2 in reply to: ↑ description @mukesh27
3 years ago

I can't find this code in WordPress git repo

Replying to sabernhardt:

However, when the link_after value is emptied to reset any description markup, that also removes the closing tag within footer links.

#3 @sabernhardt
3 years ago

Sorry, I wanted to show the context of why that line was added, but then forgot to mention the twenty_twenty_one_add_menu_description_args function.

It's a bit lower in the file now, starting on line 89.

#4 @SergeyBiryukov
3 years ago

  • Owner set to SergeyBiryukov
  • Resolution set to fixed
  • Status changed from new to closed

In 51881:

Twenty Twenty-One: Keep the closing </span> tag in footer links.

When the link_after value is emptied to reset any description markup, make sure not to remove the closing tag within footer links.

Follow-up to [49216].

Props sabernhardt, mukesh27.
Fixes #54209.

Note: See TracTickets for help on using tickets.