groups_activity_new_forum_post_primary_link

  • apply_filters( 'groups_activity_new_forum_post_primary_link', "{$primary_link}#post-{$post_id}" )

    Source Reference:

    • Component: BuddyPress :: bp-groups
      File: /bp-groups/bp-groups-forums.php :: Trac Source Line: 67
      		$primary_link = bp_get_group_permalink( $bp->groups->current_group ) . 'forum/topic/' . $topic->topic_slug . '/';
      
      		if ( $page )
      			$primary_link .= "?topic_page=" . $page;
      
      		// Record this in activity streams
      		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;
      	}
      
  • apply_filters( 'groups_activity_new_forum_post_primary_link', $primary_link . "#post-" . $post_id )

    Source Reference:

    • Component: BuddyPress :: bp-groups
      File: /bp-groups/bp-groups-forums.php :: Trac Source Line: 176
      		// Fetch an existing entry and update if one exists.
      		if ( bp_is_active( 'activity' ) )
      			$id = bp_activity_get_activity_id( array( 'user_id' => $post->poster_id, 'component' => $bp->groups->id, 'type' => 'new_forum_post', 'item_id' => $bp->groups->current_group->id, 'secondary_item_id' => $post_id ) );
      
      		// Update the entry in activity streams
      		groups_record_activity( array(
      			'id'                => $id,
      			'action'            => apply_filters_ref_array( 'groups_activity_new_forum_post_action',  array( $activity_action,  $post_text, &$topic, &$forum_post ) ),
      			'content'           => apply_filters_ref_array( 'groups_activity_new_forum_post_content', array( $activity_content, $post_text, &$topic, &$forum_post ) ),
      			'primary_link'      => apply_filters( 'groups_activity_new_forum_post_primary_link', $primary_link . "#post-" . $post_id ),
      			'type'              => 'new_forum_post',
      			'item_id'           => (int)$bp->groups->current_group->id,
      			'user_id'           => (int)$post->poster_id,
      			'secondary_item_id' => $post_id,
      			'recorded_time'     => $post->post_time
      		) );
      
      		do_action_ref_array( 'groups_update_group_forum_post', array( $post, &$topic ) );
      
      		return $post_id;
      

Comments are closed.