Allow wp_nav_menu_items filters to run on the backend as well. props NathanRice, fixes #13371.
git-svn-id: http://svn.automattic.com/wordpress/trunk@14592 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
6a3d1484bf
commit
c6572a1d16
|
@ -251,13 +251,9 @@ function wp_nav_menu( $args = array() ) {
|
|||
$nav_menu .= '<ul'. $attributes .'>';
|
||||
|
||||
// Allow plugins to hook into the menu to add their own <li>'s
|
||||
if ( 'frontend' == $args->context ) {
|
||||
$items = apply_filters( 'wp_nav_menu_items', $items, $args );
|
||||
$items = apply_filters( "wp_nav_menu_{$menu->slug}_items", $items, $args );
|
||||
$nav_menu .= $items;
|
||||
} else {
|
||||
$nav_menu .= $items;
|
||||
}
|
||||
$items = apply_filters( 'wp_nav_menu_items', $items, $args );
|
||||
$items = apply_filters( "wp_nav_menu_{$menu->slug}_items", $items, $args );
|
||||
$nav_menu .= $items;
|
||||
unset($items);
|
||||
|
||||
$nav_menu .= '</ul>';
|
||||
|
|
Loading…
Reference in New Issue