Make WordPress Core

Ticket #47024: 47024.diff

File 47024.diff, 665 bytes (added by meloniq, 6 years ago)
  • wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php

    diff --git a/wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php b/wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php
    index f673450d41..eac1e75344 100644
    a b class WP_REST_Comments_Controller extends WP_REST_Controller { 
    16561656                        return false;
    16571657                }
    16581658
    1659                 if ( ! current_user_can( 'moderate_comments' ) ) {
    1660                         return false;
     1659                if ( current_user_can( 'moderate_comments' ) ) {
     1660                        return true;
    16611661                }
    16621662
    16631663                return current_user_can( 'edit_comment', $comment->comment_ID );