Reply To: How to hide from public
this does that
add_filter( 'bbp_get_reply_content', 'rew_remove_code_tags', 10, 2 );
function rew_remove_code_tags ($content, $reply_id) {
if (!is_user_logged_in()) {
$content = preg_replace('~<code(.*?)</code>~Usi', "", $content);
}
return apply_filters( 'rew_remove_code_tags', $content, $reply_id );
}