[wp-trac] [WordPress Trac] #13822: Menu items that get unpublished still appear
WordPress Trac
noreply at wordpress.org
Wed Sep 3 05:33:38 UTC 2025
#13822: Menu items that get unpublished still appear
-------------------------------------------------+-------------------------
Reporter: nacin | Owner: nacin
Type: defect (bug) | Status: reopened
Priority: normal | Milestone: Future
| Release
Component: Menus | Version: 3.0
Severity: normal | Resolution:
Keywords: good-first-bug has-test-info has- | Focuses:
patch needs-testing |
-------------------------------------------------+-------------------------
Comment (by peterwilsoncc):
There's a little work to be done on the patch.
The patch assumes that only items with the post status `publish` should
show in menus. This will break back-compatibility for any sites using
custom public post statuses that are publicly viewable.
As noted on the PR, at a minimum it should check for
`is_post_status_viewable()` and consider any post status that is valid.
The ticket description also mentions the "need to properly handle private
posts too". I agree that would be helpful to work out.
On a site making use of the private post status and placing the items in
the menu, my expectation is that the menu item would be shown to users who
can access it and not to users who can not.
It would be helpful to get some testing notes on that use case for what
happens now and with the patch applied.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/13822#comment:57>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list