-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Navigation Menu: render item without link #18442
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All values being output into an element attribute need to be run through esc_attr()
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for working on this! Just a few fairly minor comments/questions below.
ef26329
to
1a980dd
Compare
If we end up going with a different term, at least we'll have a better idea what it all is that needs updating.
It handles the case when the item has not defined a linl, rendering the item with an <span> element instrad of an anchor <a>.
4d61148
to
8c5bc36
Compare
@retrofox is this one outdated now that we have a placeholder state for empty menu items? |
Yeah, pretty sure it is! let me close it. Thanks for the ping 👍 |
It handles the case when the item has not defined a link, rendering the item with a
<span>
element instead of an anchor<a>
.Description
How has this been tested?
Add an item without a link from the Editor canvas.
Confirm the markup sets an anchor element to those items that have defined a link, and sets a element when there aren't. Pay attention to the CSS class as well.
Screenshots
Types of changes
Checklist: