bp_blogs_activity_comment_single_permalink( string $retval, BP_Activity_Activity $activity )

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


Description Description

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


Top ↑

Parameters Parameters

$retval

(string) (Required) The activity permalink.

$activity

(BP_Activity_Activity) (Required) Activity object.


Top ↑

Return Return

(string)


Source 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;
}


Top ↑

Changelog Changelog

Changelog
Version Description
2.0.1 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.