[wp-trac] [WordPress Trac] #35107: wp_nav_menu outputs tags without line breaks in 4.4, causes strange bug with justified text

WordPress Trac noreply at wordpress.org
Fri Dec 18 20:03:44 UTC 2015


#35107: wp_nav_menu outputs tags without line breaks in 4.4, causes strange bug
with justified text
--------------------------------------------------+-----------------------
 Reporter:  wp-architect                          |       Owner:  obenland
     Type:  defect (bug)                          |      Status:  assigned
 Priority:  normal                                |   Milestone:  4.4.1
Component:  Menus                                 |     Version:  4.4
 Severity:  normal                                |  Resolution:
 Keywords:  good-first-bug 2nd-opinion has-patch  |     Focuses:  template
--------------------------------------------------+-----------------------

Comment (by DoodleDogCody):

 Replying to [comment:11 peterwilsoncc]:
 > [attachment:35107.diff] is an approach to allow both approaches:
 >
 > * remove `\n`, `\r`, `\t` string replacement in `wp_page_menu` since
 [9246]
 > * Introduces `item_before` and `item_after` arguments to
 >   - `wp_nav_menu`
 >   - `wp_list_pages`
 >   - `wp_page_menu`
 > * `item_before` defaults to an empty string
 > * `item_after` defaults to a line-break to match the pre 4.4 behaviour
 >
 > The first item has a reasonably heavy touch, possibly too much for a
 point release.

 I would say +1 to this idea.   I think it's the best way to accomplish
 this.  Allows default to go back to what it was before the update and
 gives people the options of easily editing with a simple filter in
 functions.php file.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/35107#comment:12>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list