From 36889f63134b228c4ca33b410d9c1e13d1a0e51e Mon Sep 17 00:00:00 2001 From: Peter Westwood Date: Sat, 15 Mar 2008 21:52:12 +0000 Subject: [PATCH] Only link to a post for editing if the user can edit it. git-svn-id: https://develop.svn.wordpress.org/trunk@7321 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/includes/template.php | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/wp-admin/includes/template.php b/wp-admin/includes/template.php index 203d899e57..23fbd819af 100644 --- a/wp-admin/includes/template.php +++ b/wp-admin/includes/template.php @@ -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 ( 'attachment' == $post->post_type ) - $post_link = ""; - elseif ( 'page' == $post->post_type ) - $post_link = ""; - else - $post_link = ""; + if ( current_user_can( 'edit_post', $post->ID ) ) { + if ( 'attachment' == $post->post_type ) + $post_link = ""; + elseif ( 'page' == $post->post_type ) + $post_link = ""; + else + $post_link = ""; + } $post_link .= get_the_title($comment->comment_post_ID) . ''; + $author_url = get_comment_author_url(); if ( 'http://' == $author_url ) $author_url = '';