Make WordPress Core


Ignore:
Timestamp:
03/22/2010 01:31:18 AM (14 years ago)
Author:
nacin
Message:

Restore a missing moderate_comments cap check in Right Now dashboard widget. see #12202

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/dashboard.php

    r13531 r13791  
    290290    $num = '<span class="total-count">' . number_format_i18n($num_comm->total_comments) . '</span>';
    291291    $text = _n( 'Comment', 'Comments', $num_comm->total_comments );
    292     echo '<td class="b b-comments"><a href="edit-comments.php">' . $num . '</a></td>';
    293     echo '<td class="last t comments"><a href="edit-comments.php">' . $text . '</a></td>';
     292    if ( current_user_can( 'moderate_comments' ) ) {
     293        $num = '<a href="edit-comments.php">' . $num . '</a>';
     294        $text = '<a href="edit-comments.php">' . $text . '</a>';
     295    }
     296    echo '<td class="b b-comments">' . $num . '</td>';
     297    echo '<td class="last t comments">' . $text . '</td>';
    294298
    295299    echo '</tr><tr>';
Note: See TracChangeset for help on using the changeset viewer.