Make WordPress Core

Opened 6 years ago

Last modified 9 months ago

#28514 new defect (bug)

wp_get_nav_menu_items get_posts returns false when used on wp-admin/edit.php

Reported by: evandentremont Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.9.1
Component: Menus Keywords: needs-patch
Focuses: administration Cc:

Description (last modified by SergeyBiryukov)

Works fine on wp-admin/index.php
returns false on wp-admin/edit.php

$args were correct and valid, yet get_post returns false.

I was able to make it work via the following change

/*$items = get_posts( $args );*/
$menuitems = $items;
$items = array();
foreach($menuitems as $menuitem){
	$items[] = get_post($menuitem);

Change History (3)

#1 @SergeyBiryukov
6 years ago

  • Component changed from Gallery to Menus
  • Description modified (diff)

#2 @wonderboymusic
6 years ago

  • Keywords needs-patch added
  • Milestone changed from Awaiting Review to Future Release

#3 @rommelxcastro
5 years ago

hi @evandentremont i don't really get to understand the issue, i mean how i can reproduce or how do i see the issue?


Note: See TracTickets for help on using tickets.