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
Used as a filter callback to ‘bp_activity_can_comment_reply’.
Parameters
- $retval
-
(bool) (Required) True if activity comment can be replied to.
- $comment
-
(object|bool) (Required) Current activity comment object. If empty, parameter is boolean false.
Return
(bool)
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 ); }
Changelog
Version | Description |
---|---|
BuddyPress 3.0.0 | 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.