WordPress.org

Make WordPress Core

Ticket #18340: 18340.noEdit.diff

File 18340.noEdit.diff, 1.1 KB (added by DH-Shredder, 3 years ago)

Removes Edit+Quick Edit from Spam'd posts

  • wp-admin/includes/class-wp-comments-list-table.php

     
    411411                                $actions['trash'] = "<a href='$trash_url' class='delete:the-comment-list:comment-$comment->comment_ID::trash=1 delete vim-d vim-destructive' title='" . esc_attr__( 'Move this comment to the trash' ) . "'>" . _x( 'Trash', 'verb' ) . '</a>'; 
    412412                        } 
    413413 
    414                         if ( 'trash' != $the_comment_status ) { 
     414                        if ( 'spam' != $the_comment_status && 'trash' != $the_comment_status ) { 
    415415                                $actions['edit'] = "<a href='comment.php?action=editcomment&amp;c={$comment->comment_ID}' title='" . esc_attr__( 'Edit comment' ) . "'>". __( 'Edit' ) . '</a>'; 
    416416                                $actions['quickedit'] = '<a onclick="commentReply.open( \''.$comment->comment_ID.'\',\''.$post->ID.'\',\'edit\' );return false;" class="vim-q" title="'.esc_attr__( 'Quick Edit' ).'" href="#">' . __( 'Quick&nbsp;Edit' ) . '</a>'; 
    417417                                if ( 'spam' != $the_comment_status )