Hello,
I had wondered how the private answers works: that it only worked on the theme creator.
I’ve changed it now, that there can also be private answers between users.
Here are my changes in the wvrbbp-private-reply.php.
After Line 42 $reply_author = bbp_get_reply_author_id( $reply_id );
paste:
$reply_to_id = bbp_get_reply_to( $reply_id );
if ( $reply_to_id === 0 ) {
$reply_to_id = bbp_get_topic_id();
}
$reply_to_author = bbp_get_reply_author_id( $reply_to_id );
$reply_to_authorname = get_the_author_meta(‘display_name’, $reply_to_author);
and after
if ( ! empty( $current_user ) && $reply_author === $current_user->ID ) {
// Let the reply author view their own reply
$can_view = true;
}
paste:
if ( ! empty( $current_user ) && $reply_to_author === $current_user->ID ) {
// Let the author view the private reply of his reply
$can_view = true;
}
Maybe this can be done in a new version. Maybe with option in the backend?
In addition, I let indicate to whom the private answer is directed to:
after $content = __( ‘This reply has been marked as private.’, ‘weaver-for-bbpress’ );
paste
$content .= __( ‘ (For ‘.$reply_to_authorname.’ to reply #’.$reply_to_id.’)’, ‘weaver-for-bbpress’ );
Thank you and regards,
Henry