[wp-trac] [WordPress Trac] #24101: Argument for separating wp_nav_menu items
WordPress Trac
noreply at wordpress.org
Tue Apr 16 09:50:38 UTC 2013
#24101: Argument for separating wp_nav_menu items
-----------------------------+-------------------------
Reporter: Clorith | Type: enhancement
Status: new | Priority: normal
Milestone: Awaiting Review | Component: Menus
Version: trunk | Severity: normal
Keywords: has-patch |
-----------------------------+-------------------------
There is no proper way to add separators between menu items without
generating custom walkers for menus.
The use of menu elements with separators are great for page styling where
one doesn't need a menu container like in common primary navigation areas,
but rather just want a quick list for example in a page footer.
I feel having to use a custom walker for this purpose is more work then
need be, for a feature that would make sense to include with core, the
below patch introduces the `separator` argument to the mix to address
this.
{{{wp_nav_menu( array( 'separator' => ' | ' ) );}}}
The above would output a menu as `Menu item | Menu item 2 | Menu item 3`
--
Ticket URL: <http://core.trac.wordpress.org/ticket/24101>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list