groups_activity_joined_group

  • apply_filters( 'groups_activity_joined_group', sprintf( __( '%1$s joined the group %2$s', 'buddypress'), bp_core_get_userlink( $user_id ), '<a href="' . bp_get_group_permalink( $group ) . '">' . esc_attr( bp_get_group_name( $group ) ) . '</a>'

    Source Reference:

    • Component: BuddyPress :: bp-groups
      File: /bp-groups/bp-groups-functions.php :: Trac Source Line: 324
      		return false;
      
      	if ( !isset( $bp->groups->current_group ) || !$bp->groups->current_group || $group_id != $bp->groups->current_group->id )
      		$group = new BP_Groups_Group( $group_id );
      	else
      		$group = $bp->groups->current_group;
      
      	// Record this in activity streams
      	groups_record_activity( array(
      		'action'  => apply_filters( 'groups_activity_joined_group', sprintf( __( '%1$s joined the group %2$s', 'buddypress'), bp_core_get_userlink( $user_id ), '<a href="' . bp_get_group_permalink( $group ) . '">' . esc_attr( bp_get_group_name( $group ) ) . '</a>' ) ),
      		'type'    => 'joined_group',
      		'item_id' => $group_id,
      		'user_id' => $user_id
      	) );
      
      	// Modify group meta
      	groups_update_groupmeta( $group_id, 'total_member_count', (int) groups_get_groupmeta( $group_id, 'total_member_count') + 1 );
      	groups_update_groupmeta( $group_id, 'last_activity', bp_core_current_time() );
      
      	do_action( 'groups_join_group', $group_id, $user_id );
      

Comments are closed.