bp_first_activity_for_member

Fires inside the recording of an activity item.

Description

do_action( 'bp_first_activity_for_member', (int) $user_id ); 

Use this action to detect the very first activity for a given member.

Parameters (1)

0. $user_id (int)
ID of the user whose activity is recorded.

Usage

To run the hook, copy the example below.
  1. // run the action 
  2. do_action( 'bp_first_activity_for_member', $user_id ); 
The following example is for adding a hook callback.
  1. // define the bp_first_activity_for_member callback 
  2. function action_bp_first_activity_for_member( $user_id ) { 
  3. // make action magic happen here... 
  4. }; 
  5.  
  6. // add the action 
  7. add_action( 'bp_first_activity_for_member', 'action_bp_first_activity_for_member', 10, 1 ); 
To remove a hook callback, use the example below.
  1. // remove the action 
  2. remove_action( 'bp_first_activity_for_member', 'action_bp_first_activity_for_member', 10, 1 ); 

Defined (1)

The action is defined in the following location(s).

/bp-core/bp-core-functions.php  
  1. do_action( 'bp_first_activity_for_member', $user_id );