[wp-trac] [WordPress Trac] #24101: Argument for separating wp_nav_menu items
WordPress Trac
noreply at wordpress.org
Wed Apr 17 06:59:02 UTC 2013
#24101: Argument for separating wp_nav_menu items
-----------------------------+------------------------------
Reporter: Clorith | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Menus | Version: trunk
Severity: normal | Resolution:
Keywords: has-patch close |
-----------------------------+------------------------------
Comment (by Clorith):
That was a terrible place to have a silly typo, my bad on that.
I still feel this is a valid enhancement though, as having to use custom
menu walkers for something that you find many sites use is (in my opinion)
bad.
The reason why it doesn't add the separator before a menu element is that
a separator should come between each one. It was cleaner to use a regex
approach, and it shouldn't add any noticeable performance decrease as it
will start from the end, and stop after finding a single instance of the
separator, but maybe switching it to use a prefixed separator and removing
the first instance could be an approach to prevent messing up in case of
child menus.
But yes, some added safeguards might not be a bad idea, I don't see
someone adding "a" as a separator but suggestions on approaching this are
more than welcome so that I can revise the patch and amend it
appropriately to suit everyones needs.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/24101#comment:2>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list