#24100 closed enhancement (invalid)
wp_nav_menu before and after argument tweak
Reported by: | Clorith | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | minor | Version: | 3.5.1 |
Component: | Menus | Keywords: | has-patch |
Focuses: | Cc: |
Description
When using the 'before', 'after' and link equivilants WP outputs the menu with these added to the first/last elements as well;
wp_nav_menu( array( 'before' => '|' ) );
The above will output as |Item1|Item2
, but for a menu separator this does not make sense as the first item doesn't need to be separated before it begins, appropriate output should be Item1|Item2
.
Attachments (1)
Change History (5)
#2
in reply to:
↑ 1
@
11 years ago
Replying to dd32:
It sounds like this would break any use cases where before is a opening HTML tag, and the after is a closing HTML tag, correct?
What you really want, is a new parameter which specifies a separator?
Ahh yes, I didn't think of it being used to add extra html tags at all, but yes a new separator argument would probably be a better approach then.
Note: See
TracTickets for help on using
tickets.
It sounds like this would break any use cases where before is a opening HTML tag, and the after is a closing HTML tag, correct?
What you really want, is a new parameter which specifies a separator?