[wp-trac] [WordPress Trac] #37164: WP Menu outputs posts with status "Draft" or "Pending"
WordPress Trac
noreply at wordpress.org
Fri Jun 24 08:01:40 UTC 2016
#37164: WP Menu outputs posts with status "Draft" or "Pending"
--------------------------------------+-----------------------------
Reporter: kshengelia | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Menus | Version: 4.5.3
Severity: normal | Keywords:
Focuses: administration, template |
--------------------------------------+-----------------------------
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.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/37164>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list