[buddypress-trac] [BuddyPress Trac] #7988: Supply new activity id to bp_activity_add action hook

buddypress-trac noreply at wordpress.org
Thu Oct 11 17:12:36 UTC 2018


#7988: Supply new activity id to bp_activity_add action hook
-------------------------+------------------------------
 Reporter:  drywallbmb   |       Owner:  (none)
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Awaiting Review
Component:  Core         |     Version:  3.0.0
 Severity:  normal       |  Resolution:
 Keywords:               |
-------------------------+------------------------------

Comment (by drywallbmb):

 I can envision two different approaches to addressing this.

 One would be to update $r before the action is called:
 `$r['id'] = $activity->id;`

 Another would be to pass a second parameter to the action:
 `do_action( 'bp_activity_add', $r, $activity->id );`

 I've no idea which would be preferable or more appropriate, but if someone
 can provide guidance I'd be happy to submit a patch!

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


More information about the buddypress-trac mailing list