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
This commit is contained in:
Andrew Nacin 2010-03-22 01:31:18 +00:00
parent ff1ec0a955
commit 450fa7374f
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>';