Make WordPress Core

Changeset 28913


Ignore:
Timestamp:
06/29/2014 11:18:24 PM (11 years ago)
Author:
wonderboymusic
Message:

Allow comments in the trash to marked as spam.

Props mordauk.
Fixes #19256.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-comments-list-table.php

    r28810 r28913  
    210210        if ( in_array( $comment_status, array( 'all', 'moderated' ) ) )
    211211            $actions['approve'] = __( 'Approve' );
    212         if ( in_array( $comment_status, array( 'all', 'moderated', 'approved' ) ) )
     212        if ( in_array( $comment_status, array( 'all', 'moderated', 'approved', 'trash' ) ) )
    213213            $actions['spam'] = _x( 'Mark as Spam', 'comment' );
    214214
     
    445445            }
    446446
    447             if ( 'spam' != $the_comment_status && 'trash' != $the_comment_status ) {
     447            if ( 'spam' != $the_comment_status ) {
    448448                $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>';
    449449            } elseif ( 'spam' == $the_comment_status ) {
    450450                $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>';
    451             } elseif ( 'trash' == $the_comment_status ) {
     451            }
     452
     453            if ( 'trash' == $the_comment_status ) {
    452454                $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>';
    453455            }
Note: See TracChangeset for help on using the changeset viewer.