Opened 15 years ago
Closed 14 years ago
#1870 closed defect (bug) (fixed)
Limit number of levels of threaded replies
Reported by: | ousep | Owned by: | |
---|---|---|---|
Milestone: | 1.5 | Priority: | minor |
Severity: | Version: | ||
Component: | Core | Keywords: | |
Cc: |
Description
Threaded replies, after a point, stop being usable. The textarea becomes too small to type in.
Attachments (1)
Change History (4)
#2
@
14 years ago
- Component set to Core
I'm about to commit a fix that works as follows. It adds a new function bp_activity_can_comment_reply() which, by default, always returns true. You can filter the output of that function to limit reply depth in the following way:
function test_comment_depth_limit( $can_comment, $comment ) { if ( $comment->mptt_left > 3 ) $can_comment = false; return $can_comment; } add_filter( 'bp_activity_can_comment_reply', 'test_comment_depth_limit', 10, 2 );
$comment->mptt_left refers the number of items to the left of the comment in the comment tree, including the original activity item. So this filter will limit comment depth to two levels (> 3).
Punting this to 1.3