[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 01:49:58 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
--------------------------------------------------+-----------------------
Changes (by peterwilsoncc):

 * keywords:  needs-patch good-first-bug => good-first-bug 2nd-opinion has-
     patch


Comment:

 [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.

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


More information about the wp-trac mailing list