Skip to:
Content

BuddyPress.org

Changeset 3491


Ignore:
Timestamp:
11/28/2010 04:20:39 PM (14 years ago)
Author:
boonebgorges
Message:

Adds bp_activity_can_comment_reply() function, allowing plugins to limit depth of activity comment threads. Fixes #1870

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-activity/bp-activity-templatetags.php

    r3485 r3491  
    690690
    691691                /* Reply link - the span is so that threaded reply links can be hidden when JS is off. */
    692                 if ( is_user_logged_in() )
     692                if ( is_user_logged_in() && bp_activity_can_comment_reply( $comment ) )
    693693                    $content .= '<span class="acomment-replylink"> &middot; <a href="#acomment-' . $comment->id . '" class="acomment-reply" id="acomment-reply-' . $activities_template->activity->id . '">' . __( 'Reply', 'buddypress' ) . '</a></span>';
    694694
     
    931931
    932932    return apply_filters( 'bp_activity_can_comment', $can_comment );
     933}
     934
     935function bp_activity_can_comment_reply( $comment ) {
     936    $can_comment = true;
     937
     938    return apply_filters( 'bp_activity_can_comment_reply', $can_comment, $comment );
    933939}
    934940
Note: See TracChangeset for help on using the changeset viewer.