Allow comments in the trash to marked as spam.
Props mordauk. Fixes #19256. Built from https://develop.svn.wordpress.org/trunk@28913 git-svn-id: http://core.svn.wordpress.org/trunk@28712 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
21864a98d0
commit
c8936195f6
|
@ -209,7 +209,7 @@ class WP_Comments_List_Table extends WP_List_Table {
|
|||
$actions['unapprove'] = __( 'Unapprove' );
|
||||
if ( in_array( $comment_status, array( 'all', 'moderated' ) ) )
|
||||
$actions['approve'] = __( 'Approve' );
|
||||
if ( in_array( $comment_status, array( 'all', 'moderated', 'approved' ) ) )
|
||||
if ( in_array( $comment_status, array( 'all', 'moderated', 'approved', 'trash' ) ) )
|
||||
$actions['spam'] = _x( 'Mark as Spam', 'comment' );
|
||||
|
||||
if ( 'trash' == $comment_status )
|
||||
|
@ -444,11 +444,13 @@ class WP_Comments_List_Table extends WP_List_Table {
|
|||
$actions['unapprove'] = "<a href='$unapprove_url' data-wp-lists='dim:the-comment-list:comment-$comment->comment_ID:unapproved:e7e7d3:e7e7d3:new=unapproved' class='vim-u' title='" . esc_attr__( 'Unapprove this comment' ) . "'>" . __( 'Unapprove' ) . '</a>';
|
||||
}
|
||||
|
||||
if ( 'spam' != $the_comment_status && 'trash' != $the_comment_status ) {
|
||||
if ( 'spam' != $the_comment_status ) {
|
||||
$actions['spam'] = "<a href='$spam_url' data-wp-lists='delete:the-comment-list:comment-$comment->comment_ID::spam=1' class='vim-s vim-destructive' title='" . esc_attr__( 'Mark this comment as spam' ) . "'>" . /* translators: mark as spam link */ _x( 'Spam', 'verb' ) . '</a>';
|
||||
} elseif ( 'spam' == $the_comment_status ) {
|
||||
$actions['unspam'] = "<a href='$unspam_url' data-wp-lists='delete:the-comment-list:comment-$comment->comment_ID:66cc66:unspam=1' class='vim-z vim-destructive'>" . _x( 'Not Spam', 'comment' ) . '</a>';
|
||||
} elseif ( 'trash' == $the_comment_status ) {
|
||||
}
|
||||
|
||||
if ( 'trash' == $the_comment_status ) {
|
||||
$actions['untrash'] = "<a href='$untrash_url' data-wp-lists='delete:the-comment-list:comment-$comment->comment_ID:66cc66:untrash=1' class='vim-z vim-destructive'>" . __( 'Restore' ) . '</a>';
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue