Skip to:
Content
Pages
Categories
Search
Top
Bottom

Reply To: Blog & Forum Comments

@danbp

Participant

Since BuddyPress 2.0.0 you can use this in bp-custom.php

function namrons_activity_nocomment( $can_comment = true, $type = '' ) {
        if ( empty( $can_comment ) ) {
                return $can_comment;
        }
 
        // activities which can't be commented
        $cant_comment_types = array( 
				'new_forum_topic' => 1,
				'new_forum_post' => 1,
        );
 
        return ! isset( $cant_comment_types[ $type ] );
}
add_filter( 'bp_activity_can_comment', 'namrons_activity_nocomment', 10, 2 );
Skip to toolbar