From 79ba4ca2ec1474900e68a7dbab99c16eeb63415d Mon Sep 17 00:00:00 2001 From: ryan Date: Mon, 20 Mar 2006 19:45:46 +0000 Subject: [PATCH] edit_comment_link fix from westi. fixes #2559 git-svn-id: http://svn.automattic.com/wordpress/trunk@3647 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/template-functions-links.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/wp-includes/template-functions-links.php b/wp-includes/template-functions-links.php index 2c9539f29..1d991f0d2 100644 --- a/wp-includes/template-functions-links.php +++ b/wp-includes/template-functions-links.php @@ -228,12 +228,13 @@ function edit_post_link($link = 'Edit This', $before = '', $after = '') { function edit_comment_link($link = 'Edit This', $before = '', $after = '') { global $post, $comment; - if( $post->post_type == 'page' ) + if( $post->post_type == 'page' ){ if ( ! current_user_can('edit_page', $post->ID) ) return; - else + } else { if ( ! current_user_can('edit_post', $post->ID) ) return; + } $location = get_settings('siteurl') . "/wp-admin/comment.php?action=editcomment&comment=$comment->comment_ID"; echo $before . "$link" . $after;