mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-02 05:31:25 +01:00
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. Built from https://develop.svn.wordpress.org/trunk@37584 git-svn-id: http://core.svn.wordpress.org/trunk@37552 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
2f998cac7f
commit
9913b6eec4
@ -951,7 +951,7 @@ function wp_ajax_get_comments( $action ) {
|
||||
$x = new WP_Ajax_Response();
|
||||
ob_start();
|
||||
foreach ( $wp_list_table->items as $comment ) {
|
||||
if ( ! current_user_can( 'edit_comment', $comment->comment_ID ) )
|
||||
if ( ! current_user_can( 'edit_comment', $comment->comment_ID ) && 0 === $comment->comment_approved )
|
||||
continue;
|
||||
get_comment( $comment );
|
||||
$wp_list_table->single_row( $comment );
|
||||
|
@ -4,7 +4,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.6-alpha-37583';
|
||||
$wp_version = '4.6-alpha-37584';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
Reference in New Issue
Block a user