Don't show edit link for comments when the user cannot edit them, props filosofo, fixes #10520 for trunk
git-svn-id: https://develop.svn.wordpress.org/trunk@11752 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
16241293d3
commit
97027f3abe
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user