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
This commit is contained in:
nacin 2010-03-22 01:31:18 +00:00
parent 18bab7afe6
commit 261592f3e7
1 changed files with 6 additions and 2 deletions

View File

@ -289,8 +289,12 @@ function wp_dashboard_right_now() {
// Total Comments
$num = '<span class="total-count">' . number_format_i18n($num_comm->total_comments) . '</span>';
$text = _n( 'Comment', 'Comments', $num_comm->total_comments );
echo '<td class="b b-comments"><a href="edit-comments.php">' . $num . '</a></td>';
echo '<td class="last t comments"><a href="edit-comments.php">' . $text . '</a></td>';
if ( current_user_can( 'moderate_comments' ) ) {
$num = '<a href="edit-comments.php">' . $num . '</a>';
$text = '<a href="edit-comments.php">' . $text . '</a>';
}
echo '<td class="b b-comments">' . $num . '</td>';
echo '<td class="last t comments">' . $text . '</td>';
echo '</tr><tr>';