edit_comment_link fix from westi. fixes #2559
git-svn-id: http://svn.automattic.com/wordpress/trunk@3647 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
f3880e051d
commit
79ba4ca2ec
|
@ -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 . "<a href='$location'>$link</a>" . $after;
|
||||
|
|
Loading…
Reference in New Issue