From 4a0d729415991220b3c69ab88d8b4ad0d81587d4 Mon Sep 17 00:00:00 2001 From: markjaquith Date: Mon, 25 Jun 2012 19:56:48 +0000 Subject: [PATCH] Properly show comments on Page edit screen. props duck_. fixes #20937 for trunk git-svn-id: http://core.svn.wordpress.org/trunk@21107 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/meta-boxes.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/wp-admin/includes/meta-boxes.php b/wp-admin/includes/meta-boxes.php index 7dc455286b..2146b84c56 100644 --- a/wp-admin/includes/meta-boxes.php +++ b/wp-admin/includes/meta-boxes.php @@ -476,24 +476,24 @@ function post_comment_meta_box($post) {

get_var($wpdb->prepare("SELECT count(1) FROM $wpdb->comments WHERE comment_post_ID = '%d' AND ( comment_approved = '0' OR comment_approved = '1')", $post_ID)); + $total = get_comments( array( 'post_id' => $post_ID, 'number' => 1, 'count' => true ) ); $wp_list_table = _get_list_table('WP_Post_Comments_List_Table'); $wp_list_table->display( true ); if ( 1 > $total ) { echo '

' . __('No comments yet.') . '

'; } else { - $hidden = get_hidden_meta_boxes('post'); + $hidden = get_hidden_meta_boxes( get_current_screen() ); if ( ! in_array('commentsdiv', $hidden) ) { ?> - - +

+