[wp-trac] [WordPress Trac] #28514: wp_get_nav_menu_items get_posts returns false when used on wp-admin/edit.php
WordPress Trac
noreply at wordpress.org
Thu Jun 12 18:27:37 UTC 2014
#28514: wp_get_nav_menu_items get_posts returns false when used on wp-
admin/edit.php
----------------------------+-----------------------------
Reporter: evandentremont | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Gallery | Version: 3.9.1
Severity: normal | Keywords:
Focuses: administration |
----------------------------+-----------------------------
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);
}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/28514>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list