Only link to a post for editing if the user can edit it.
git-svn-id: http://svn.automattic.com/wordpress/trunk@7321 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
91011917f7
commit
8a81571933
|
@ -606,13 +606,16 @@ function _wp_comment_row( $comment_id, $mode, $comment_status, $checkbox = true
|
|||
$authordata = get_userdata($post->post_author);
|
||||
$the_comment_status = wp_get_comment_status($comment->comment_ID);
|
||||
$class = ('unapproved' == $the_comment_status) ? 'unapproved' : '';
|
||||
if ( current_user_can( 'edit_post', $post->ID ) ) {
|
||||
if ( 'attachment' == $post->post_type )
|
||||
$post_link = "<a href='upload.php?attachment_id=$post->ID'>";
|
||||
elseif ( 'page' == $post->post_type )
|
||||
$post_link = "<a href='edit-pages.php?page_id=$post->ID'>";
|
||||
else
|
||||
$post_link = "<a href='edit.php?p=$post->ID'>";
|
||||
}
|
||||
$post_link .= get_the_title($comment->comment_post_ID) . '</a>';
|
||||
|
||||
$author_url = get_comment_author_url();
|
||||
if ( 'http://' == $author_url )
|
||||
$author_url = '';
|
||||
|
|
Loading…
Reference in New Issue