[buddypress-trac] [BuddyPress Trac] #5720: bp_core_new_subnav_item() only barely works for non-user nav

buddypress-trac noreply at wordpress.org
Thu Jun 19 02:11:54 UTC 2014


#5720: bp_core_new_subnav_item() only barely works for non-user nav
--------------------------+------------------
 Reporter:  boonebgorges  |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  2.1
Component:  Core          |     Version:
 Severity:  normal        |  Resolution:
 Keywords:  dev-feedback  |
--------------------------+------------------
Changes (by boonebgorges):

 * keywords:   => dev-feedback


Comment:

 The last half of `bp_core_new_subnav_item()` is basically impossible to
 write unit tests for. It mixes up a bunch of display and hooking logic,
 and performs some redirects. I'm proposing that a helper function be
 written, which will perform the hooking + generate arguments for a
 redirect if necessary, and will then return this value back to
 `bp_core_new_subnav_item()` to perform the redirect. This should make it
 possible to write unit tests, and then to start hacking at the function
 for broader support.

 See 5720.break-up-bp_core_new_subnav_item.patch. Could I get another dev
 to take a look to make sure this technique makes sense?

--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/5720#comment:3>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list