From 450fa7374f9877dd06f63ef520ad835b5eccb158 Mon Sep 17 00:00:00 2001 From: Andrew 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: https://develop.svn.wordpress.org/trunk@13791 602fd350-edb4-49c9-b593-d223f7449a82 --- 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 76103b9115..418c233a71 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 '';