Skip to content
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

Handle menu items with _invalid flag #34818

Closed
spacedmonkey opened this issue Sep 14, 2021 · 4 comments
Closed

Handle menu items with _invalid flag #34818

spacedmonkey opened this issue Sep 14, 2021 · 4 comments
Labels
[Feature] Navigation Component A navigational waterfall component for hierarchy of items. [Status] Duplicate Used to indicate that a current issue matches an existing one and can be closed [Type] Enhancement A suggestion for improvement.

Comments

@spacedmonkey
Copy link
Member

What problem does this address?

A nav menu_item object returned from calling wp_setup_nav_menu_item. This object contains a property called _invalid. It is used for the following.

Whether the menu item represents an object that no longer exists.

A menu item can be invalid for the following reasons.

  • Linked post is post status trash
  • Linked term does not exist
  • post_type_archive post type doesn't exist.
  • Taxonomy archive, taxonomy doesn't exist.

The new navigation editor should handle this case. See the existing menu screens.

Screenshot 2021-09-14 at 18 29 03

Screenshot 2021-09-14 at 18 29 22

Related: #34670

What is your proposed solution?

@spacedmonkey spacedmonkey added [Type] Enhancement A suggestion for improvement. [Feature] Navigation Screen [Feature] Navigation Component A navigational waterfall component for hierarchy of items. labels Sep 14, 2021
@spacedmonkey
Copy link
Member Author

Related: #31716

@talldan
Copy link
Contributor

talldan commented Sep 15, 2021

@spacedmonkey I think this is a duplicate of #23573, which is a high priority on the tracking issue.

@spacedmonkey
Copy link
Member Author

@talldan Feel like it. Wanted to ensure we respect the value come from the REST API. If #23573 will do this, then I am happy to close this ticket.

@talldan
Copy link
Contributor

talldan commented Sep 16, 2021

👍 I've added the details from this description to that one.

@talldan talldan closed this as completed Sep 16, 2021
@talldan talldan added the [Status] Duplicate Used to indicate that a current issue matches an existing one and can be closed label Sep 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Navigation Component A navigational waterfall component for hierarchy of items. [Status] Duplicate Used to indicate that a current issue matches an existing one and can be closed [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

2 participants