bp_activity_remove_user_favorite
Fires if bp_update_user_meta() is successful and before returning a true value for success.
Description
Parameters (2)
- 0. $activity_id (int)
- ID of the activity item being unfavorited.
- 1. $user_id (int)
- ID of the user doing the unfavoriting.
Usage
- To run the hook, copy the example below.
- // run the action
- do_action( 'bp_activity_remove_user_favorite', $activity_id, $user_id );
- The following example is for adding a hook callback.
- // define the bp_activity_remove_user_favorite callback
- function action_bp_activity_remove_user_favorite( $activity_id, $user_id ) {
- // make action magic happen here...
- };
- // add the action
- add_action( 'bp_activity_remove_user_favorite', 'action_bp_activity_remove_user_favorite', 10, 2 );
- To remove a hook callback, use the example below.
- // remove the action
- remove_action( 'bp_activity_remove_user_favorite', 'action_bp_activity_remove_user_favorite', 10, 2 );
Defined (1)
The action is defined in the following location(s).
- /bp-activity/bp-activity-functions.php
- do_action( 'bp_activity_remove_user_favorite', $activity_id, $user_id );