Don't show edit links for spam comments. Props DH-Shredder. fixes #18340
git-svn-id: http://svn.automattic.com/wordpress/trunk@19296 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
c657c79258
commit
7f10cf4814
|
@ -69,6 +69,9 @@ case 'editcomment' :
|
|||
if ( 'trash' == $comment->comment_approved )
|
||||
comment_footer_die( __('This comment is in the Trash. Please move it out of the Trash if you want to edit it.') );
|
||||
|
||||
if ( 'spam' == $comment->comment_approved )
|
||||
comment_footer_die( __('This comment is marked as Spam. Please mark it as Not Spam if you want to edit it.') );
|
||||
|
||||
$comment = get_comment_to_edit( $comment_id );
|
||||
|
||||
include('./edit-form-comment.php');
|
||||
|
|
|
@ -411,10 +411,9 @@ class WP_Comments_List_Table extends WP_List_Table {
|
|||
$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>';
|
||||
}
|
||||
|
||||
if ( 'trash' != $the_comment_status ) {
|
||||
if ( 'spam' != $the_comment_status && 'trash' != $the_comment_status ) {
|
||||
$actions['edit'] = "<a href='comment.php?action=editcomment&c={$comment->comment_ID}' title='" . esc_attr__( 'Edit comment' ) . "'>". __( 'Edit' ) . '</a>';
|
||||
$actions['quickedit'] = '<a onclick="commentReply.open( \''.$comment->comment_ID.'\',\''.$post->ID.'\',\'edit\' );return false;" class="vim-q" title="'.esc_attr__( 'Quick Edit' ).'" href="#">' . __( 'Quick Edit' ) . '</a>';
|
||||
if ( 'spam' != $the_comment_status )
|
||||
$actions['reply'] = '<a onclick="commentReply.open( \''.$comment->comment_ID.'\',\''.$post->ID.'\' );return false;" class="vim-r" title="'.esc_attr__( 'Reply to this comment' ).'" href="#">' . __( 'Reply' ) . '</a>';
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue