bp_groups_filter_activity_can_comment_reply( bool $retval, object|bool $comment )

Function used to determine if a user can reply on a group activity comment.

Description Description

Used as a filter callback to ‘bp_activity_can_comment_reply’.

Top ↑

Parameters Parameters


(bool) (Required) True if activity comment can be replied to.


(object|bool) (Required) Current activity comment object. If empty, parameter is boolean false.

Top ↑

Return Return


Source Source

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

function bp_groups_filter_activity_can_comment_reply( $retval, $comment ) {
	// Bail if no current user, if comment is empty or if retval is already empty.
	if ( ! is_user_logged_in() || empty( $comment ) || empty( $retval ) ) {
		return $retval;

	// Grab parent activity item.
	$parent = new BP_Activity_Activity( $comment->item_id );

	// Check to see if user can reply to parent group activity item.
	return bp_groups_filter_activity_can_comment( $retval, $parent );

Top ↑

Changelog Changelog

Version Description
3.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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