[buddypress-trac] [BuddyPress] #3419: bp_core_remove_nav_item() support WP admin bar as well?

buddypress-trac at lists.automattic.com buddypress-trac at lists.automattic.com
Mon Dec 5 20:53:52 UTC 2011


#3419: bp_core_remove_nav_item() support WP admin bar as well?
--------------------------------------------+-----------------------
 Reporter:  r-a-y                           |       Owner:
     Type:  enhancement                     |      Status:  reopened
 Priority:  normal                          |   Milestone:  1.6
Component:  Core                            |     Version:  1.5
 Severity:  normal                          |  Resolution:
 Keywords:  reporter-feedback dev-feedback  |
--------------------------------------------+-----------------------
Changes (by boonebgorges):

 * keywords:  needs-patch => reporter-feedback dev-feedback


Comment:

 3419.01.patch is an idea for how this might be done. It's essentially the
 same thing that r-a-y suggested, using a stack rather than a single item
 in the global (to allow for multiple removals).

 It's very hackish. To my mind, there is no non-hackish way to do it. The
 way in which the admin bar is currently set up has nothing to do with
 bp_core_new_nav_item(). It's set up manually, in each component loader's
 setup_admin_bar() method. In contrast, the BuddyBar was set up directly
 out of $bp->bp_options_nav, etc, so there was a guaranteed parallel
 between the two. IMO, making them separate is a good thing, though perhaps
 we have made them *too* separate - ideally, they should be linked by
 default, but it should be possible to unsync them. Anyway, that's kinda
 beside the point. Because the setup_admin_bar() is more or less hardcoded,
 there is no reliable way to figure out which WP Admin Bar item corresponds
 to which BP navigation item. In order for this to be reliable, we need to
 have some system of automation in place for setup_admin_bar().

 Have a look at my patch and see what you think. I am tempted to say that
 we punt this issue for now, and in the next dev cycle (when we'll really
 start deprecating the BuddyBar, and so don't have to be as concerned about
 backpat) we take a fresh look at how our navigation is built, and to what
 extent it should be tied to the admin bar. Until then, plugin devs should
 remove their items manually, as r-a-y suggests.

-- 
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/3419#comment:7>
BuddyPress <http://buddypress.org/>
BuddyPress


More information about the buddypress-trac mailing list