groups_new_forum_topic_post

  • do_action( 'groups_new_forum_topic_post', $bp->groups->current_group->id, $post_id )

    Source Reference:

    • Component: BuddyPress:: bp-groups
      File: /bp-groups/bp-groups-forums.php :: Trac Source Line: 73
      		groups_record_activity( array(
      			'action'            => apply_filters_ref_array( 'groups_activity_new_forum_post_action',       array( $activity_action,  $post_id, $post_text, &$topic ) ),
      			'content'           => apply_filters_ref_array( 'groups_activity_new_forum_post_content',      array( $activity_content, $post_id, $post_text, &$topic ) ),
      			'primary_link'      => apply_filters( 'groups_activity_new_forum_post_primary_link', "{$primary_link}#post-{$post_id}" ),
      			'type'              => 'new_forum_post',
      			'item_id'           => $bp->groups->current_group->id,
      			'secondary_item_id' => $post_id
      		) );
      
      		do_action( 'groups_new_forum_topic_post', $bp->groups->current_group->id, $post_id );
      
      		return $post_id;
      	}
      
      	return false;
      }
      
      function groups_new_group_forum_topic( $topic_title, $topic_text, $topic_tags, $forum_id ) {
      	global $bp;
      

Hook: add_action: groups_new_forum_topic_post instances (1)

  • add_action( 'groups_new_forum_topic_post', 'groups_update_last_activity' )
    $function_to_add: groups_update_last_activity
    $priority: 0
    $accepted_args: 0

    Source Reference:

    • Component: BuddyPress :: bp-groups
      File: /bp-groups/bp-groups-activity.php :: Trac Source Line: 76
      	if ( !$group_id )
      		return false;
      
      	groups_update_groupmeta( $group_id, 'last_activity', bp_core_current_time() );
      }
      add_action( 'groups_leave_group', 'groups_update_last_activity' );
      add_action( 'groups_created_group', 'groups_update_last_activity' );
      add_action( 'groups_new_forum_topic', 'groups_update_last_activity' );
      add_action( 'groups_new_forum_topic_post', 'groups_update_last_activity' );
      
      function groups_format_notifications( $action, $item_id, $secondary_item_id, $total_items, $format = 'string' ) {
      	global $bp;
      
      	switch ( $action ) {
      		case 'new_membership_request':
      			$group_id = $secondary_item_id;
      			$requesting_user_id = $item_id;
      
      			$group = new BP_Groups_Group( $group_id );
      

Comments are closed.