[buddypress-trac] [BuddyPress Trac] #8054: Filter bp_activity_custom_update params

buddypress-trac noreply at wordpress.org
Fri Mar 8 11:03:32 UTC 2019


#8054: Filter bp_activity_custom_update params
--------------------------+---------------------
 Reporter:  Maniou        |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  5.0.0
Component:  Activity      |     Version:
 Severity:  normal        |  Resolution:
 Keywords:                |
--------------------------+---------------------

Comment (by imath):

 Hi @boonebgorges

 Thanks a lot for the ping. Imho The filter in Nouveau or Legacy are more
 consistent than the one in
 https://buddypress.trac.wordpress.org/browser/trunk/src/bp-
 activity/actions/post.php#L85

 I think we simply forgot to update the above file probably because this
 file is a fallback when JavaScript fails Ajax posting the activity.

 So I'm in favor of using :
 {{{
 $activity_id = apply_filters( 'bp_activity_custom_update', 0, $object,
 $item_id, $_POST['content'] );
 }}}

 {{{false}}} is fine too but as the filter should return the actvity_id of
 the posted custom activity I think it would be better :)

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


More information about the buddypress-trac mailing list