[buddypress-trac] [BuddyPress Trac] #6503: Separate functions for creating a new nav link and registering a screen function.

buddypress-trac noreply at wordpress.org
Sun Jun 14 16:59:30 UTC 2015


#6503: Separate functions for creating a new nav link and registering a screen
function.
------------------------------+-----------------------------
 Reporter:  dcavins           |      Owner:
     Type:  enhancement       |     Status:  new
 Priority:  normal            |  Milestone:  Awaiting Review
Component:  Component - Core  |    Version:  2.3.1
 Severity:  normal            |   Keywords:  has-patch
------------------------------+-----------------------------
 The functions `bp_core_new_subnav_item()` and `bp_core_new_nav_item()`
 each do two things: add a link to the navigation menu and register the
 screen function that should be fired when that link is used. Sometimes, it
 would be handy to do one without the other. For instance, in a group, you
 have a pane that isn't important enough to warrant its own navigation
 itemin the group nav (the navigation to that page is handled in some other
 way), but you do need to register the screen function.
 `BP_Group_Extension` allows such an arrangement, but the underlying
 functions are all-or-nothing.

 The attached patch separates the action into two pieces: add the link to
 the nav, register the screen function.

 See #6301 for more discussion.

 Thanks for your feedback.

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


More information about the buddypress-trac mailing list