[buddypress-trac] [BuddyPress] #4629: New function which combines primary/secondary nav menus into one

buddypress-trac noreply at wordpress.org
Fri Oct 26 19:46:09 UTC 2012


#4629: New function which combines primary/secondary nav menus into one
-------------------------+-----------------------------
 Reporter:  DJPaul       |      Owner:
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  Awaiting Review
Component:  Core         |    Version:
 Severity:  normal       |   Keywords:
-------------------------+-----------------------------
 Patch implements a proposed merged nav menu function. Written for the
 turtleshell template pack.


 BP currently renders its menus via `bp_get_displayed_user_nav()` and
 `bp_get_options_nav()`. It's been an annoying quirk that we've ended up
 with these two get_ functions which print the output rather than return
 it. Historically, these menus have always been visually separate in the
 Default theme; either vertically before 1.2, and horizontally nested since
 1.2. Something that's been asked from the community is  a way to produce a
 merged menu

 This can't be done today without plugins/themes touching the $bp object. A
 merged menu would allow e.g. easy implementation of a multi-level, expand-
 on-mouseover menu -- just like the main navigation of a lot of WordPress
 themes.

 The attached patch implements this proposed feature, and introduces a
 custom Walker class and `bp_nav_menu()`. The arguments for `bp_nav_menu`
 are identical to `wp_nav_menu()`, providing maximum customisation and
 familiarity for WordPress theme authors, and should give us reasonable
 future compatibility (`bp_nav_menu()` could become a wrapper).

-- 
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/4629>
BuddyPress <http://buddypress.org/>
BuddyPress


More information about the buddypress-trac mailing list