Opened 8 years ago
Last modified 8 years ago
#40178 new enhancement
Menus that contain post types in Draft status should be hidden from logged out users
Reported by: | jdingman | Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | 4.7.3 |
Component: | General | Keywords: | has-patch 2nd-opinion needs-testing |
Focuses: | ui, administration | Cc: |
Description
I recently added 2 pages to my site. I published them, and moved them into a Menu on my site.
Then realized, I don't want them public, but I also don't want to lose their positioning where I put them in the menu. I moved them to draft.
When I go to my site logged out, I still see the links and goes to a 404.
I'm proposing that when an item in the Menu moves to a non-published state that isn't the Trash (Draft or Pending), it should remain in the nav, but be hidden from any logged out users.
Attachments (4)
Change History (8)
#4
@
8 years ago
- Keywords 2nd-opinion needs-testing added
I think that it would be better not to declare draft content in the menu as "invalid".
I added a new patch that shows draft items as orange with a new warning. They are then filtered out the same way as invalid items, but with a new filter function checking that the content is published.
Customizer support for this approach needs to be added.
I was able to reproduce this and I agree that it is a bug. Non-published pages do not appear on the dropdown list in Appearance > Menus. However, when once added to a menu, they will appear in the Menu Structure in wp-admin regardless of their publish status.
After proposed patch, unpublished items will appear as such "Name (Invalid)" on the wp-admin part.