[wp-trac] [WordPress Trac] #21302: possible bug with wp_nav_menu(), not allowing code to be wrapped around the output

WordPress Trac wp-trac at lists.automattic.com
Wed Jul 18 07:46:59 UTC 2012


#21302: possible bug with wp_nav_menu(), not allowing code to be wrapped around the
output
--------------------------+------------------------------
 Reporter:  anointed      |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Menus         |     Version:  3.0
 Severity:  normal        |  Resolution:
 Keywords:                |
--------------------------+------------------------------

Comment (by SergeyBiryukov):

 Tried your example. `tumble_menu()` needs two fixes:
 1. Replace `'echo' => true` with `'echo' => false`.
 2. Add `return $main_menu;` to the end of the function (otherwise `$html =
 tumble_menu()` is null).

 Once I changed that, the wrapper was displayed correctly.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/21302#comment:3>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list