REST API: Ensure users with "moderate_comments" capability may edit comments.
Props meloniq. Fixes #47024. Built from https://develop.svn.wordpress.org/trunk@46433 git-svn-id: http://core.svn.wordpress.org/trunk@46231 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
bcd399918f
commit
de6d164870
|
@ -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 );
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '5.3-beta2-46432';
|
||||
$wp_version = '5.3-beta2-46433';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue