From 261592f3e70dc8804c308bcc41415c4922e803c3 Mon Sep 17 00:00:00 2001 From: nacin Date: Mon, 22 Mar 2010 01:31:18 +0000 Subject: [PATCH] Restore a missing moderate_comments cap check in Right Now dashboard widget. see #12202 git-svn-id: http://svn.automattic.com/wordpress/trunk@13791 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/dashboard.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/wp-admin/includes/dashboard.php b/wp-admin/includes/dashboard.php index 76103b911..418c233a7 100644 --- a/wp-admin/includes/dashboard.php +++ b/wp-admin/includes/dashboard.php @@ -289,8 +289,12 @@ function wp_dashboard_right_now() { // Total Comments $num = '' . number_format_i18n($num_comm->total_comments) . ''; $text = _n( 'Comment', 'Comments', $num_comm->total_comments ); - echo '' . $num . ''; - echo '' . $text . ''; + if ( current_user_can( 'moderate_comments' ) ) { + $num = '' . $num . ''; + $text = '' . $text . ''; + } + echo '' . $num . ''; + echo '' . $text . ''; echo '';