[buddypress-trac] [BuddyPress] #3652: bp_core_new_nav_default() doesn't really work

buddypress-trac at lists.automattic.com buddypress-trac at lists.automattic.com
Mon Oct 3 21:26:25 UTC 2011


#3652: bp_core_new_nav_default() doesn't really work
--------------------------+-------------------------
 Reporter:  boonebgorges  |      Owner:
     Type:  defect        |     Status:  new
 Priority:  normal        |  Milestone:  1.6
Component:  Core          |    Version:
 Severity:  minor         |   Keywords:  needs-patch
--------------------------+-------------------------
 bp_core_new_nav_default() is supposed to let you set a default subnav for
 a nav item other than the one originally registered with the nav item.

 It doesn't really work, because of this check:
 http://buddypress.trac.wordpress.org/browser/tags/1.5/bp-core/bp-core-
 buddybar.php#L116  The !$bp->current_action check will never return true,
 because bp_core_new_nav_item() will always set a current_action
 (http://buddypress.trac.wordpress.org/browser/tags/1.5/bp-core/bp-core-
 buddybar.php#L82)

 Have a feeling this is going to be tricky to fix, because with
 $bp->current_action set, I don't think there's an easy way for BP to know
 the difference between, eg
 http://example.com/members/boone/settings/
 and
 http://example.com/members/boone/settings/general/

 Obviously, when you change the default, you only want to change the
 behavior of the former URL, not the latter.

 Maybe when we manually set $bp->current_action in bp_core_new_nav_item(),
 we should set a flag in the global that says that we did so? Have to think
 about it. Really we should also think about content duplication issues
 here too; if /members/boone/settings/ shows General, then we shouldn't
 have another URL /members/boone/settings/general/. See #1741.

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


More information about the buddypress-trac mailing list