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’.
Parameters 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 Return
(bool)
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 ); }
Expand full source code Collapse full source code View on Trac
Changelog Changelog
Version | Description |
---|---|
3.0.0 | Introduced. |