[buddypress-trac] [BuddyPress Trac] #6523: Dynamic nav menu items should be easier to extend/customize
buddypress-trac
noreply at wordpress.org
Mon Jun 22 19:30:48 UTC 2015
#6523: Dynamic nav menu items should be easier to extend/customize
--------------------------+-----------------
Reporter: boonebgorges | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: 2.4
Component: API | Version:
Severity: normal | Keywords:
--------------------------+-----------------
In #5122 [7427] we introduced BP items to Appearance > Menus. At the
moment, it's not really possible for a plugin to modify or add to these
items.
The obvious fix for this is to add filters to
`bp_nav_menu_get_loggedin_pages()` and
`bp_nav_menu_get_loggedout_pages()`. But I have a little trepidation about
this for two reasons.
(1) The process for building nav items in the Customizer is different. So
a filter here may not be easily ported when #6509 is addressed.
(2) The `$page_args` returned from these BP functions are page-like
objects, which we fake with `stdClass` objects. It's a hack that is not
ideal, but is acceptable in part because it's an internal mechanism. By
adding filters, it turns into a public API that we've gotta support into
the future.
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/6523>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac
More information about the buddypress-trac
mailing list