﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	severity	resolution	keywords	cc
13371	Nav menu items should be filterable, regardless of context	nathanrice	nacin	"It's kind of weird that in order for a plugin/theme to filter the nav menu items, the $args->context needs to be 'frontend'.

For example, since the $args object is passed through the wp_nav_menu_items filter, the user-defined filter can do the contextual checks. For instance ...

{{{
add_filter('wp_nav_menu_items', 'my_nav_menu_items_filter', 10, 2);
function my_nav_menu_items_filter($items, $args) {
    if( $args->context != 'frontend' )
        return $items;

    // proceed with the filter
}
}}}

Plus, I can see plenty of reasons why a plugin/theme might want to filter the items regardless of context.

Either way, it should be up to the plugin/theme author, shouldn't it?

I've attached a patch."	defect (bug)	closed	normal	3.0	Menus	3.0	normal	fixed	menus, nav menus, has-patch	
