Ticket #7212: action-filter.diff
| File action-filter.diff, 1.3 kB (added by andy, 5 months ago) |
|---|
-
includes/template.php
old new 767 767 768 768 $actions = array(); 769 769 770 if ( current_user_can('edit_post', $comment->comment_post_ID) ) { 770 771 $actions['approve'] = "<a href='$approve_url' class='dim:the-comment-list:comment-$comment->comment_ID:unapproved:e7e7d3:e7e7d3' title='" . __( 'Approve this comment' ) . "'>" . __( 'Approve' ) . '</a> | '; 771 772 $actions['unapprove'] = "<a href='$unapprove_url' class='dim:the-comment-list:comment-$comment->comment_ID:unapproved:e7e7d3:e7e7d3' title='" . __( 'Unapprove this comment' ) . "'>" . __( 'Unapprove' ) . '</a> | '; 772 773 … … 779 780 unset($actions['approve']); 780 781 } 781 782 782 if ( current_user_can('edit_post', $comment->comment_post_ID) ) {783 783 $actions['spam'] = "<a href='$spam_url' class='delete:the-comment-list:comment-$comment->comment_ID::spam=1' title='" . __( 'Mark this comment as spam' ) . "'>" . __( 'Spam' ) . '</a> | '; 784 784 $actions['delete'] = "<a href='$delete_url' class='delete:the-comment-list:comment-$comment->comment_ID delete'>" . __('Delete') . '</a>'; 785 $actions = apply_filters( 'comment_row_actions', $actions, $comment ); 785 786 foreach ( $actions as $action => $link ) 786 787 echo "<span class='$action'>$link</span>"; 787 788 }
