bp_blogs_activity_comment_single_permalink( string $retval, BP_Activity_Activity $activity )

Changes single activity comment entries to use the blog comment permalink.

Description

This is only done if the activity comment is associated with a blog comment.

Parameters

$retval

(string) (Required) The activity permalink.

$activity

(BP_Activity_Activity) (Required) Activity object.

Return

(string)

Source

File: bp-blogs/bp-blogs-activity.php

function bp_blogs_activity_comment_single_permalink( $retval, $activity ) {
	if ( 'activity_comment' !== $activity->type ) {
		return $retval;
	}

	if ( bp_disable_blogforum_comments() ) {
		return $retval;
	}

	$parent_activity = new BP_Activity_Activity( $activity->item_id );

	if ( isset( $parent_activity->type ) && bp_activity_post_type_get_tracking_arg( $parent_activity->type, 'post_type' ) ) {
		$retval = $activity->primary_link;
	}

	return $retval;
}

Changelog

Changelog
Version Description
BuddyPress 2.0.1 Introduced.

Questions?

We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.