WordPress.org

Make WordPress Core

Changeset 34074


Ignore:
Timestamp:
09/12/2015 07:18:36 AM (6 years ago)
Author:
wonderboymusic
Message:

AJAX Reply to Comment: check the edit_comment cap when parent comment will be auto-approved.

Props rachelbaker.
Fixes #23939.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/ajax-actions.php

    r33933 r34074  
    10121012
    10131013        if ( $parent && $parent->comment_approved === '0' && $parent->comment_post_ID == $comment_post_ID ) {
     1014            if ( ! current_user_can( 'edit_comment', $parent->comment_ID ) ) {
     1015                wp_die( -1 );
     1016            }
     1017
    10141018            if ( wp_set_comment_status( $parent->comment_ID, 'approve' ) )
    10151019                $comment_auto_approved = true;
Note: See TracChangeset for help on using the changeset viewer.