[wp-trac] [WordPress Trac] #28515: wp_get_nav_menu_items using old syntax
WordPress Trac
noreply at wordpress.org
Thu Jun 12 21:51:08 UTC 2014
#28515: wp_get_nav_menu_items using old syntax
----------------------------+--------------------
Reporter: evandentremont | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: 4.0
Component: Menus | Version: 3.9.1
Severity: normal | Resolution:
Keywords: | Focuses:
----------------------------+--------------------
Changes (by SergeyBiryukov):
* focuses: performance =>
* component: General => Menus
* milestone: Awaiting Review => 4.0
Old description:
> In nav-menu.php, function wp_get_nav_menu_items()
>
> if ( count( $items ) > 1 )
> $args!['include'] = implode( ',', $items );
> else
> $args!['include'] = $items![0];
>
> can be replaced by
> $args!['include'] = items;
>
> "Beginning with Version 3.0, an array of Page ID also can be used." I
> presume that applies to posts as well since posts page says to "See also
> get_pages() for example parameter usage."
New description:
In nav-menu.php, function wp_get_nav_menu_items()
{{{
if ( count( $items ) > 1 )
$args['include'] = implode( ',', $items );
else
$args['include'] = $items[0];
}}}
can be replaced by
{{{
$args['include'] = items;
}}}
"Beginning with Version 3.0, an array of Page ID also can be used." I
presume that applies to posts as well since posts page says to "See also
get_pages() for example parameter usage."
--
--
Ticket URL: <https://core.trac.wordpress.org/ticket/28515#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list