bp_groups_posted_update
Fires after posting of an Activity status update affiliated with a group.
Description
do_action( 'bp_groups_posted_update', (string) $content, (int) $user_id, (int) $group_id, (bool) $activity_id );
Parameters (4)
- 0. $content (string)
- The content of the update.
- 1. $user_id (int)
- ID of the user posting the update.
- 2. $group_id (int)
- ID of the group being posted to.
- 3. $activity_id (bool)
- Whether or not the activity recording succeeded.
Usage
- To run the hook, copy the example below.
- // run the action
- do_action( 'bp_groups_posted_update', $content, $user_id, $group_id, $activity_id );
- The following example is for adding a hook callback.
- // define the bp_groups_posted_update callback
- function action_bp_groups_posted_update( $content, $user_id, $group_id, $activity_id ) {
- // make action magic happen here...
- };
- // add the action
- add_action( 'bp_groups_posted_update', 'action_bp_groups_posted_update', 10, 4 );
- To remove a hook callback, use the example below.
- // remove the action
- remove_action( 'bp_groups_posted_update', 'action_bp_groups_posted_update', 10, 4 );
Defined (1)
The action is defined in the following location(s).
- /bp-groups/bp-groups-functions.php
- do_action( 'bp_groups_posted_update', $content, $user_id, $group_id, $activity_id );