[buddypress-trac] [BuddyPress Trac] #6534: A new API to manage single items navigation

buddypress-trac noreply at wordpress.org
Mon Jun 6 15:03:55 UTC 2016

#6534: A new API to manage single items navigation
 Reporter:  imath                   |       Owner:  boonebgorges
     Type:  enhancement             |      Status:  reopened
 Priority:  high                    |   Milestone:  2.6
Component:  API - Nav               |     Version:
 Severity:  normal                  |  Resolution:
 Keywords:  dev-feedback has-patch  |
Changes (by dcavins):

 * status:  closed => reopened
 * resolution:  fixed =>


 I just noticed a bug when attempting to call
 `bp_core_remove_subnav_item( $parent_slug, 'send-invites' );`
 for a group-related sub-navigation item.

 The underlying issue is that the when `$component` isn't specified in
 `bp_core_remove_subnav_item()`, and we think it's a group-related item, we
 call  `bp_core_remove_subnav_item()` again, specifying the `$component` as
 `groups`. The parameters were being sent back to the function in the wrong
 order (`$parent_slug` and `$slug` were reversed).

 `6534.param-order-fix.patch` fixes the parameter order problem.

 I'm wondering if it wouldn't be more efficient to just set `$component`
 and continue, though, rather than starting the function over with the
 `$component` set (which means `buddypress()` will be called again). So the
 other patch, `6534.set-component-instead.patch` takes the low road and
 simply sets the `$component`.

Ticket URL: <https://buddypress.trac.wordpress.org/ticket/6534#comment:39>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac

More information about the buddypress-trac mailing list