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:
parent
18bab7afe6
commit
261592f3e7
|
@ -289,8 +289,12 @@ function wp_dashboard_right_now() {
|
||||||
// Total Comments
|
// Total Comments
|
||||||
$num = '<span class="total-count">' . number_format_i18n($num_comm->total_comments) . '</span>';
|
$num = '<span class="total-count">' . number_format_i18n($num_comm->total_comments) . '</span>';
|
||||||
$text = _n( 'Comment', 'Comments', $num_comm->total_comments );
|
$text = _n( 'Comment', 'Comments', $num_comm->total_comments );
|
||||||
echo '<td class="b b-comments"><a href="edit-comments.php">' . $num . '</a></td>';
|
if ( current_user_can( 'moderate_comments' ) ) {
|
||||||
echo '<td class="last t comments"><a href="edit-comments.php">' . $text . '</a></td>';
|
$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>';
|
echo '</tr><tr>';
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue