Make WordPress Core

Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#10520 closed defect (bug) (fixed)

edit_comment_link() logic faulty

Reported by: filosofo Owned by:
Milestone: 2.8.3 Priority: normal
Severity: normal Version: 2.8.1
Component: Template Keywords: edit_comment_link has-patch
Focuses: Cc:


The current logic of edit_comment_link() prints an edit link for everyone on comments for attachments.

The default capability check of

if ( !current_user_can( 'edit_post', $post->ID ) )

should be used instead, because it works with attachments as well as posts.

Attachments (1)

edit_comment_link.logic.10520.diff (473 bytes) - added by filosofo 9 years ago.

Download all attachments as: .zip

Change History (3)

#1 @azaozz
9 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [11751]) Don't show edit link for comments when the user cannot edit them, props filosofo, fixes #10520 for 2.8

#2 @azaozz
9 years ago

In [11752] for trunk

Note: See TracTickets for help on using tickets.