WordPress.org

Make WordPress Core

Changeset 37584


Ignore:
Timestamp:
05/27/2016 02:09:29 PM (4 years ago)
Author:
rachelbaker
Message:

Comments: Display approved comments on the Edit Post screen to users without the edit_comment capability.

Matches logic in wp_dashboard_recent_comments() where we display approved comments regardless of the edit permission.

Props jfarthing84 for initial patch.
Fixes #24648.

File:
1 edited

Legend:

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

    r37537 r37584  
    952952    ob_start();
    953953    foreach ( $wp_list_table->items as $comment ) {
    954         if ( ! current_user_can( 'edit_comment', $comment->comment_ID ) )
     954        if ( ! current_user_can( 'edit_comment', $comment->comment_ID ) && 0 === $comment->comment_approved )
    955955            continue;
    956956        get_comment( $comment );
Note: See TracChangeset for help on using the changeset viewer.