[ 이 글은 2016년 7월 28일에 최종 수정되었습니다. ]

참고: 1월 20일까지 해외 웹호스팅 업체인 블루호스트에서 할인 행사를 진행하고 있습니다.

You may want to restrict editing bbPress posts by users who are not administrators. For this, the following function should work:

function change_admin_links ($r) {
if ( empty( $r['links'] ) && (current_user_can('editor') || current_user_can('administrator')) ) {
$r['links'] = apply_filters( 'rw_reply_admin_links', array(
'edit'  => bbp_get_reply_edit_link ( $r ),
'move'  => bbp_get_reply_move_link ( $r ),
'split' => bbp_get_topic_split_link( $r ),
'trash' => bbp_get_reply_trash_link( $r ),
'spam'  => bbp_get_reply_spam_link ( $r ),
'reply' => bbp_get_reply_to_link   ( $r )
), $r['id'] );
} else

{
$r['links'] = apply_filters( 'rw_reply_admin_links', array(
'reply' => bbp_get_reply_to_link   ( $r )
), $r['id'] );
}
return $r['links'] ;
}
add_filter ('bbp_reply_admin_links', 'change_admin_links' ) ;

Please add the above code to your WordPress theme’s functions file (functions.php under your theme’s folder). Of course, if you uses a child theme, please add it to the functions file of your child theme.

Now users who do not have Administrator or Editor privileges cannot edit their posts. This will prevent users from modifying the posts by purpose.

I tested it and it worked well. If it would not work, you may edit the file “template.php” under “\wp-content\plugins\bbpress\includes\replies\”. (However, as you know, it’s not desirable to edit the source files of plugins whenever possible.)

Please feel free to leave a Comment (). Have a great day.