bp_blogs_post_type_comments_avoid_duplicates( int $retval )
Limit the display of post type synced comments.
Parameters Parameters
- $retval
-
(int) (Required) The comment count for the activity.
Return Return
(int) The comment count, or 0 to hide activity comment replies.
Source Source
File: bp-blogs/bp-blogs-activity.php
function bp_blogs_post_type_comments_avoid_duplicates( $retval ) { /** * Only limit the display when Post type comments are synced with * activity comments. */ if ( bp_disable_blogforum_comments() ) { return $retval; } if ( 'activity_comment' !== bp_get_activity_type() ) { return $retval; } // Check the parent activity. $parent_activity = new BP_Activity_Activity( bp_get_activity_item_id() ); if ( isset( $parent_activity->type ) && bp_activity_post_type_get_tracking_arg( $parent_activity->type, 'post_type' ) ) { $retval = 0; } return $retval; }
Expand full source code Collapse full source code View on Trac
Changelog Changelog
Version | Description |
---|---|
2.5.0 | Introduced. |