bbPress-Private-replies icon indicating copy to clipboard operation
bbPress-Private-replies copied to clipboard

Private replies are still displayed in BuddyPress Activity Streams

Open naumanahmed19 opened this issue 11 years ago • 1 comments

I was looking for a solution for this topic and fixed it using following code. I am not plugin developer. Kindly check it if its okay

http://wordpress.org/support/topic/private-replies-are-still-displayed-in-buddypress-activity-streams?replies=5

public function update_reply( $reply_id = 0, $topic_id = 0, $forum_id = 0, $anonymous_data = false, $author_id = 0, $is_edit = false ) {

        if( isset( $_POST['bbp_private_reply'] ) ){
            update_post_meta( $reply_id, '_bbp_reply_is_private', '1' );

            add_filter( 'bbp_is_site_public', 'yourownprefix_enable_bbp_activity', 10, 2);

            function yourownprefix_enable_bbp_activity( $public, $site_id ) {
              return false;
            }
        }
        else
            delete_post_meta( $reply_id, '_bbp_reply_is_private' );

    }```

naumanahmed19 avatar Jul 20 '14 10:07 naumanahmed19

Great suggestion ☺

solhuebner avatar Aug 17 '14 18:08 solhuebner