Opened 10 years ago
Closed 10 years ago
#37164 closed defect (bug) (duplicate)
WP Menu outputs posts with status "Draft" or "Pending"
| Reported by: | kshengelia | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Menus | Version: | 4.5.3 |
| Severity: | normal | Keywords: | dev-feedback |
| Cc: | Focuses: | administration, template |
Description
When using "wp_get_nav_menu_items" function to output menu items, we are getting posts of any status - Published, Draft or Pending.
We have covered getting inactive posts in our framework by having a dedicated function for it but "wp_get_nav_menu_items" is core function and probably it should be done in core as well.
So, the end result would be that if I put inactive posts into menu, this function should filter those posts and output only active posts.
Change History (4)
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
I couldn't reproduce. In the menus the 'View all' list there's only the public one.