mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 14:20:15 +00:00
REST API: Ensure users with "moderate_comments" capability may edit comments.
Props meloniq. Fixes #47024. git-svn-id: https://develop.svn.wordpress.org/trunk@46433 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -1672,8 +1672,8 @@ class WP_REST_Comments_Controller extends WP_REST_Controller {
|
||||
return false;
|
||||
}
|
||||
|
||||
if ( ! current_user_can( 'moderate_comments' ) ) {
|
||||
return false;
|
||||
if ( current_user_can( 'moderate_comments' ) ) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return current_user_can( 'edit_comment', $comment->comment_ID );
|
||||
|
||||
Reference in New Issue
Block a user