groups_activity_new_forum_topic_primary_link

  • apply_filters( 'groups_activity_new_forum_topic_primary_link', bp_get_group_permalink( $bp->groups->current_group ) . 'forum/topic/' . $topic->topic_slug . '/' )

    Source Reference:

    • Component: BuddyPress :: bp-groups
      File: /bp-groups/bp-groups-forums.php :: Trac Source Line: 102
      		$topic = bp_forums_get_topic_details( $topic_id );
      
      		$activity_action = sprintf( __( '%1$s started the forum topic %2$s in the group %3$s', 'buddypress'), bp_core_get_userlink( $bp->loggedin_user->id ), '<a href="' . bp_get_group_permalink( $bp->groups->current_group ) . 'forum/topic/' . $topic->topic_slug .'/">' . esc_attr( $topic->topic_title ) . '</a>', '<a href="' . bp_get_group_permalink( $bp->groups->current_group ) . '">' . esc_attr( $bp->groups->current_group->name ) . '</a>' );
      		$activity_content = bp_create_excerpt( $topic_text );
      
      		// Record this in activity streams
      		groups_record_activity( array(
      			'action'            => apply_filters_ref_array( 'groups_activity_new_forum_topic_action',  array( $activity_action,  $topic_text, &$topic ) ),
      			'content'           => apply_filters_ref_array( 'groups_activity_new_forum_topic_content', array( $activity_content, $topic_text, &$topic ) ),
      			'primary_link'      => apply_filters( 'groups_activity_new_forum_topic_primary_link', bp_get_group_permalink( $bp->groups->current_group ) . 'forum/topic/' . $topic->topic_slug . '/' ),
      			'type'              => 'new_forum_topic',
      			'item_id'           => $bp->groups->current_group->id,
      			'secondary_item_id' => $topic->topic_id
      		) );
      
      	  do_action_ref_array( 'groups_new_forum_topic', array( $bp->groups->current_group->id, &$topic ) );
      
      		return $topic;
      	}
      
    • Component: BuddyPress :: bp-groups
      File: /bp-groups/bp-groups-forums.php :: Trac Source Line: 134
      			bp_activity_delete_by_item_id( array( 'item_id' => $bp->groups->current_group->id, 'secondary_item_id' => $topic_id, 'component' => $bp->groups->id, 'type' => 'new_forum_topic' ) );
      
      		$activity_action = sprintf( __( '%1$s started the forum topic %2$s in the group %3$s', 'buddypress'), bp_core_get_userlink( $topic->topic_poster ), '<a href="' . bp_get_group_permalink( $bp->groups->current_group ) . 'forum/topic/' . $topic->topic_slug .'/">' . esc_attr( $topic->topic_title ) . '</a>', '<a href="' . bp_get_group_permalink( $bp->groups->current_group ) . '">' . esc_attr( $bp->groups->current_group->name ) . '</a>' );
      		$activity_content = bp_create_excerpt( $topic_text );
      
      		// Record this in activity streams
      		groups_record_activity( array(
      			'action'            => apply_filters_ref_array( 'groups_activity_new_forum_topic_action',  array( $activity_action,  $topic_text, &$topic ) ),
      			'content'           => apply_filters_ref_array( 'groups_activity_new_forum_topic_content', array( $activity_content, $topic_text, &$topic ) ),
      			'primary_link'      => apply_filters( 'groups_activity_new_forum_topic_primary_link', bp_get_group_permalink( $bp->groups->current_group ) . 'forum/topic/' . $topic->topic_slug . '/' ),
      			'type'              => 'new_forum_topic',
      			'item_id'           => (int)$bp->groups->current_group->id,
      			'user_id'           => (int)$topic->topic_poster,
      			'secondary_item_id' => $topic->topic_id,
      			'recorded_time '    => $topic->topic_time
      		) );
      
      		do_action_ref_array( 'groups_update_group_forum_topic', array( &$topic ) );
      
      		return $topic;
      

Comments are closed.