WordPress.org

Make WordPress Core

Ticket #5811: 5811.r6772.diff

File 5811.r6772.diff, 1.2 KB (added by hansengel, 10 years ago)

Removes second unnecessary check for sufficient user permissions in wp-admin/edit-comments.php

  • wp-admin/edit-comments.php

     
    147147                <a href="<?php echo get_permalink($comment->comment_post_ID); ?>#comment-<?php comment_ID() ?>" class="edit"><?php _e('View') ?></a>
    148148        <?php } ?>
    149149    </td>
    150     <td><?php if ( current_user_can('edit_post', $comment->comment_post_ID) ) {
    151         echo "<a href='comment.php?action=editcomment&amp;c=$comment->comment_ID' class='edit'>" .  __('Edit') . "</a>"; } ?></td>
    152     <td><?php if ( current_user_can('edit_post', $comment->comment_post_ID) ) {
     150    <?php if ( current_user_can('edit_post', $comment->comment_post_ID) ) { ?>
     151    <td><?php
     152        echo "<a href='comment.php?action=editcomment&amp;c=$comment->comment_ID' class='edit'>" .  __('Edit') . "</a></td>"; ?>
     153    <td><?php
    153154                $url = clean_url( wp_nonce_url( "comment.php?action=deletecomment&p=$comment->comment_post_ID&c=$comment->comment_ID", "delete-comment_$comment->comment_ID" ) );
    154155                echo "<a href='$url' class='delete:the-comment-list:comment-$comment->comment_ID delete'>" . __('Delete') . "</a> ";
    155156                } ?></td>