From a52e9d5e9a090fa20c6f0918c2f06112245ac79a Mon Sep 17 00:00:00 2001 From: azaozz Date: Thu, 30 Jul 2009 15:43:04 +0000 Subject: [PATCH] Don't show edit link for comments when the user cannot edit them, props filosofo, fixes #10520 for trunk git-svn-id: http://svn.automattic.com/wordpress/trunk@11752 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/link-template.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/wp-includes/link-template.php b/wp-includes/link-template.php index 471a6468ba..96453aabcb 100644 --- a/wp-includes/link-template.php +++ b/wp-includes/link-template.php @@ -768,8 +768,7 @@ function get_edit_comment_link( $comment_id = 0 ) { function edit_comment_link( $link = 'Edit This', $before = '', $after = '' ) { global $comment, $post; - if ( $post->post_type == 'attachment' ) { - } elseif ( $post->post_type == 'page' ) { + if ( $post->post_type == 'page' ) { if ( !current_user_can( 'edit_page', $post->ID ) ) return; } else {