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

buddypress-trac noreply at wordpress.org
Sun Feb 24 13:59:20 UTC 2019


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

 On  :

 **/bp-templates/bp-legacy/buddypress-functions.php**

 and

 **src/bp-templates/bp-nouveau/includes/activity/ajax.php**

 we have :

 {{{
 $activity_id = apply_filters( 'bp_activity_custom_update', false, $object,
 $item_id, $_POST['content'] );
 }}}

 but on

 **src/bp-activity/actions/post.php**

 we have :

 {{{
                 /**
                  * Filters activity object for BuddyPress core and plugin
 authors before posting activity update.
                  *
                  * @since 1.2.0
                  *
                  * @param string $object  Activity item being associated
 to.
                  * @param string $item_id Component ID being posted to.
                  * @param string $content Activity content being posted.
                  */
                 $activity_id = apply_filters( 'bp_activity_custom_update',
 $object, $item_id, $content );
 }}}

 What is the good way to use this filter ?

 Thanks you !

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


More information about the buddypress-trac mailing list