3 * List Table API: WP_Comments_List_Table class
6 * @subpackage Administration
11 * Core class used to implement displaying comments in a list table.
18 class WP_Comments_List_Table extends WP_List_Table {
20 public $checkbox = true;
22 public $pending_count = array();
34 * @see WP_List_Table::__construct() for more information on default arguments.
36 * @global int $post_id
38 * @param array $args An associative array of arguments.
40 public function __construct( $args = array() ) {
43 $post_id = isset( $_REQUEST['p'] ) ? absint( $_REQUEST['p'] ) : 0;
45 if ( get_option( 'show_avatars' ) ) {
46 add_filter( 'comment_author', array( $this, 'floated_admin_avatar' ), 10, 2 );
49 parent::__construct( array(
50 'plural' => 'comments',
51 'singular' => 'comment',
53 'screen' => isset( $args['screen'] ) ? $args['screen'] : null,
57 public function floated_admin_avatar( $name, $comment_ID ) {
58 $comment = get_comment( $comment_ID );
59 $avatar = get_avatar( $comment, 32, 'mystery' );
60 return "$avatar $name";
66 public function ajax_user_can() {
67 return current_user_can('edit_posts');
72 * @global int $post_id
73 * @global string $comment_status
74 * @global string $search
75 * @global string $comment_type
77 public function prepare_items() {
78 global $post_id, $comment_status, $search, $comment_type;
80 $comment_status = isset( $_REQUEST['comment_status'] ) ? $_REQUEST['comment_status'] : 'all';
81 if ( !in_array( $comment_status, array( 'all', 'moderated', 'approved', 'spam', 'trash' ) ) )
82 $comment_status = 'all';
84 $comment_type = !empty( $_REQUEST['comment_type'] ) ? $_REQUEST['comment_type'] : '';
86 $search = ( isset( $_REQUEST['s'] ) ) ? $_REQUEST['s'] : '';
88 $post_type = ( isset( $_REQUEST['post_type'] ) ) ? sanitize_key( $_REQUEST['post_type'] ) : '';
90 $user_id = ( isset( $_REQUEST['user_id'] ) ) ? $_REQUEST['user_id'] : '';
92 $orderby = ( isset( $_REQUEST['orderby'] ) ) ? $_REQUEST['orderby'] : '';
93 $order = ( isset( $_REQUEST['order'] ) ) ? $_REQUEST['order'] : '';
95 $comments_per_page = $this->get_per_page( $comment_status );
97 $doing_ajax = wp_doing_ajax();
99 if ( isset( $_REQUEST['number'] ) ) {
100 $number = (int) $_REQUEST['number'];
103 $number = $comments_per_page + min( 8, $comments_per_page ); // Grab a few extra
106 $page = $this->get_pagenum();
108 if ( isset( $_REQUEST['start'] ) ) {
109 $start = $_REQUEST['start'];
111 $start = ( $page - 1 ) * $comments_per_page;
114 if ( $doing_ajax && isset( $_REQUEST['offset'] ) ) {
115 $start += $_REQUEST['offset'];
119 'moderated' => 'hold',
120 'approved' => 'approve',
125 'status' => isset( $status_map[$comment_status] ) ? $status_map[$comment_status] : $comment_status,
127 'user_id' => $user_id,
130 'post_id' => $post_id,
131 'type' => $comment_type,
132 'orderby' => $orderby,
134 'post_type' => $post_type,
137 $_comments = get_comments( $args );
138 if ( is_array( $_comments ) ) {
139 update_comment_cache( $_comments );
141 $this->items = array_slice( $_comments, 0, $comments_per_page );
142 $this->extra_items = array_slice( $_comments, $comments_per_page );
144 $_comment_post_ids = array_unique( wp_list_pluck( $_comments, 'comment_post_ID' ) );
146 $this->pending_count = get_pending_comments_num( $_comment_post_ids );
149 $total_comments = get_comments( array_merge( $args, array(
155 $this->set_pagination_args( array(
156 'total_items' => $total_comments,
157 'per_page' => $comments_per_page,
163 * @param string $comment_status
166 public function get_per_page( $comment_status = 'all' ) {
167 $comments_per_page = $this->get_items_per_page( 'edit_comments_per_page' );
169 * Filters the number of comments listed per page in the comments list table.
173 * @param int $comments_per_page The number of comments to list per page.
174 * @param string $comment_status The comment status name. Default 'All'.
176 return apply_filters( 'comments_per_page', $comments_per_page, $comment_status );
181 * @global string $comment_status
183 public function no_items() {
184 global $comment_status;
186 if ( 'moderated' === $comment_status ) {
187 _e( 'No comments awaiting moderation.' );
189 _e( 'No comments found.' );
195 * @global int $post_id
196 * @global string $comment_status
197 * @global string $comment_type
199 protected function get_views() {
200 global $post_id, $comment_status, $comment_type;
202 $status_links = array();
203 $num_comments = ( $post_id ) ? wp_count_comments( $post_id ) : wp_count_comments();
206 /* translators: %s: all comments count */
208 'All <span class="count">(%s)</span>',
209 'All <span class="count">(%s)</span>',
211 ), // singular not used
213 /* translators: %s: pending comments count */
214 'moderated' => _nx_noop(
215 'Pending <span class="count">(%s)</span>',
216 'Pending <span class="count">(%s)</span>',
220 /* translators: %s: approved comments count */
221 'approved' => _nx_noop(
222 'Approved <span class="count">(%s)</span>',
223 'Approved <span class="count">(%s)</span>',
227 /* translators: %s: spam comments count */
229 'Spam <span class="count">(%s)</span>',
230 'Spam <span class="count">(%s)</span>',
234 /* translators: %s: trashed comments count */
236 'Trash <span class="count">(%s)</span>',
237 'Trash <span class="count">(%s)</span>',
242 if ( !EMPTY_TRASH_DAYS )
243 unset($stati['trash']);
245 $link = admin_url( 'edit-comments.php' );
246 if ( !empty($comment_type) && 'all' != $comment_type )
247 $link = add_query_arg( 'comment_type', $comment_type, $link );
249 foreach ( $stati as $status => $label ) {
250 $class = ( $status === $comment_status ) ? ' class="current"' : '';
252 if ( !isset( $num_comments->$status ) )
253 $num_comments->$status = 10;
254 $link = add_query_arg( 'comment_status', $status, $link );
256 $link = add_query_arg( 'p', absint( $post_id ), $link );
258 // I toyed with this, but decided against it. Leaving it in here in case anyone thinks it is a good idea. ~ Mark
259 if ( !empty( $_REQUEST['s'] ) )
260 $link = add_query_arg( 's', esc_attr( wp_unslash( $_REQUEST['s'] ) ), $link );
262 $status_links[ $status ] = "<a href='$link'$class>" . sprintf(
263 translate_nooped_plural( $label, $num_comments->$status ),
264 sprintf( '<span class="%s-count">%s</span>',
265 ( 'moderated' === $status ) ? 'pending' : $status,
266 number_format_i18n( $num_comments->$status )
272 * Filters the comment status links.
276 * @param array $status_links An array of fully-formed status links. Default 'All'.
277 * Accepts 'All', 'Pending', 'Approved', 'Spam', and 'Trash'.
279 return apply_filters( 'comment_status_links', $status_links );
284 * @global string $comment_status
288 protected function get_bulk_actions() {
289 global $comment_status;
292 if ( in_array( $comment_status, array( 'all', 'approved' ) ) )
293 $actions['unapprove'] = __( 'Unapprove' );
294 if ( in_array( $comment_status, array( 'all', 'moderated' ) ) )
295 $actions['approve'] = __( 'Approve' );
296 if ( in_array( $comment_status, array( 'all', 'moderated', 'approved', 'trash' ) ) )
297 $actions['spam'] = _x( 'Mark as Spam', 'comment' );
299 if ( 'trash' === $comment_status ) {
300 $actions['untrash'] = __( 'Restore' );
301 } elseif ( 'spam' === $comment_status ) {
302 $actions['unspam'] = _x( 'Not Spam', 'comment' );
305 if ( in_array( $comment_status, array( 'trash', 'spam' ) ) || !EMPTY_TRASH_DAYS )
306 $actions['delete'] = __( 'Delete Permanently' );
308 $actions['trash'] = __( 'Move to Trash' );
315 * @global string $comment_status
316 * @global string $comment_type
318 * @param string $which
320 protected function extra_tablenav( $which ) {
321 global $comment_status, $comment_type;
323 <div class="alignleft actions">
325 if ( 'top' === $which ) {
327 <label class="screen-reader-text" for="filter-by-comment-type"><?php _e( 'Filter by comment type' ); ?></label>
328 <select id="filter-by-comment-type" name="comment_type">
329 <option value=""><?php _e( 'All comment types' ); ?></option>
332 * Filters the comment types dropdown menu.
336 * @param array $comment_types An array of comment types. Accepts 'Comments', 'Pings'.
338 $comment_types = apply_filters( 'admin_comment_types_dropdown', array(
339 'comment' => __( 'Comments' ),
340 'pings' => __( 'Pings' ),
343 foreach ( $comment_types as $type => $label )
344 echo "\t" . '<option value="' . esc_attr( $type ) . '"' . selected( $comment_type, $type, false ) . ">$label</option>\n";
349 * Fires just before the Filter submit button for comment types.
353 do_action( 'restrict_manage_comments' );
354 submit_button( __( 'Filter' ), '', 'filter_action', false, array( 'id' => 'post-query-submit' ) );
357 if ( ( 'spam' === $comment_status || 'trash' === $comment_status ) && current_user_can( 'moderate_comments' ) ) {
358 wp_nonce_field( 'bulk-destroy', '_destroy_nonce' );
359 $title = ( 'spam' === $comment_status ) ? esc_attr__( 'Empty Spam' ) : esc_attr__( 'Empty Trash' );
360 submit_button( $title, 'apply', 'delete_all', false );
363 * Fires after the Filter submit button for comment types.
367 * @param string $comment_status The comment status name. Default 'All'.
369 do_action( 'manage_comments_nav', $comment_status );
374 * @return string|false
376 public function current_action() {
377 if ( isset( $_REQUEST['delete_all'] ) || isset( $_REQUEST['delete_all2'] ) )
380 return parent::current_action();
385 * @global int $post_id
389 public function get_columns() {
394 if ( $this->checkbox )
395 $columns['cb'] = '<input type="checkbox" />';
397 $columns['author'] = __( 'Author' );
398 $columns['comment'] = _x( 'Comment', 'column name' );
401 /* translators: column name or table row header */
402 $columns['response'] = __( 'In Response To' );
405 $columns['date'] = _x( 'Submitted On', 'column name' );
414 protected function get_sortable_columns() {
416 'author' => 'comment_author',
417 'response' => 'comment_post_ID',
418 'date' => 'comment_date'
423 * Get the name of the default primary column.
428 * @return string Name of the default primary column, in this case, 'comment'.
430 protected function get_default_primary_column_name() {
437 public function display() {
438 wp_nonce_field( "fetch-list-" . get_class( $this ), '_ajax_fetch_list_nonce' );
440 $this->display_tablenav( 'top' );
442 $this->screen->render_screen_reader_content( 'heading_list' );
445 <table class="wp-list-table <?php echo implode( ' ', $this->get_table_classes() ); ?>">
448 <?php $this->print_column_headers(); ?>
452 <tbody id="the-comment-list" data-wp-lists="list:comment">
453 <?php $this->display_rows_or_placeholder(); ?>
456 <tbody id="the-extra-comment-list" data-wp-lists="list:comment" style="display: none;">
458 $this->items = $this->extra_items;
459 $this->display_rows_or_placeholder();
465 <?php $this->print_column_headers( false ); ?>
472 $this->display_tablenav( 'bottom' );
476 * @global WP_Post $post
477 * @global WP_Comment $comment
479 * @param WP_Comment $item
481 public function single_row( $item ) {
482 global $post, $comment;
486 $the_comment_class = wp_get_comment_status( $comment );
487 if ( ! $the_comment_class ) {
488 $the_comment_class = '';
490 $the_comment_class = join( ' ', get_comment_class( $the_comment_class, $comment, $comment->comment_post_ID ) );
492 if ( $comment->comment_post_ID > 0 ) {
493 $post = get_post( $comment->comment_post_ID );
495 $this->user_can = current_user_can( 'edit_comment', $comment->comment_ID );
497 echo "<tr id='comment-$comment->comment_ID' class='$the_comment_class'>";
498 $this->single_row_columns( $comment );
501 unset( $GLOBALS['post'], $GLOBALS['comment'] );
505 * Generate and display row actions links.
510 * @global string $comment_status Status for the current listed comments.
512 * @param WP_Comment $comment The comment object.
513 * @param string $column_name Current column name.
514 * @param string $primary Primary column name.
515 * @return string|void Comment row actions output.
517 protected function handle_row_actions( $comment, $column_name, $primary ) {
518 global $comment_status;
520 if ( $primary !== $column_name ) {
524 if ( ! $this->user_can ) {
528 $the_comment_status = wp_get_comment_status( $comment );
532 $del_nonce = esc_html( '_wpnonce=' . wp_create_nonce( "delete-comment_$comment->comment_ID" ) );
533 $approve_nonce = esc_html( '_wpnonce=' . wp_create_nonce( "approve-comment_$comment->comment_ID" ) );
535 $url = "comment.php?c=$comment->comment_ID";
537 $approve_url = esc_url( $url . "&action=approvecomment&$approve_nonce" );
538 $unapprove_url = esc_url( $url . "&action=unapprovecomment&$approve_nonce" );
539 $spam_url = esc_url( $url . "&action=spamcomment&$del_nonce" );
540 $unspam_url = esc_url( $url . "&action=unspamcomment&$del_nonce" );
541 $trash_url = esc_url( $url . "&action=trashcomment&$del_nonce" );
542 $untrash_url = esc_url( $url . "&action=untrashcomment&$del_nonce" );
543 $delete_url = esc_url( $url . "&action=deletecomment&$del_nonce" );
545 // Preorder it: Approve | Reply | Quick Edit | Edit | Spam | Trash.
547 'approve' => '', 'unapprove' => '',
551 'spam' => '', 'unspam' => '',
552 'trash' => '', 'untrash' => '', 'delete' => ''
555 // Not looking at all comments.
556 if ( $comment_status && 'all' != $comment_status ) {
557 if ( 'approved' === $the_comment_status ) {
558 $actions['unapprove'] = "<a href='$unapprove_url' data-wp-lists='delete:the-comment-list:comment-$comment->comment_ID:e7e7d3:action=dim-comment&new=unapproved' class='vim-u vim-destructive' aria-label='" . esc_attr__( 'Unapprove this comment' ) . "'>" . __( 'Unapprove' ) . '</a>';
559 } elseif ( 'unapproved' === $the_comment_status ) {
560 $actions['approve'] = "<a href='$approve_url' data-wp-lists='delete:the-comment-list:comment-$comment->comment_ID:e7e7d3:action=dim-comment&new=approved' class='vim-a vim-destructive' aria-label='" . esc_attr__( 'Approve this comment' ) . "'>" . __( 'Approve' ) . '</a>';
563 $actions['approve'] = "<a href='$approve_url' data-wp-lists='dim:the-comment-list:comment-$comment->comment_ID:unapproved:e7e7d3:e7e7d3:new=approved' class='vim-a' aria-label='" . esc_attr__( 'Approve this comment' ) . "'>" . __( 'Approve' ) . '</a>';
564 $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' aria-label='" . esc_attr__( 'Unapprove this comment' ) . "'>" . __( 'Unapprove' ) . '</a>';
567 if ( 'spam' !== $the_comment_status ) {
568 $actions['spam'] = "<a href='$spam_url' data-wp-lists='delete:the-comment-list:comment-$comment->comment_ID::spam=1' class='vim-s vim-destructive' aria-label='" . esc_attr__( 'Mark this comment as spam' ) . "'>" . /* translators: mark as spam link */ _x( 'Spam', 'verb' ) . '</a>';
569 } elseif ( 'spam' === $the_comment_status ) {
570 $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' aria-label='" . esc_attr__( 'Restore this comment from the spam' ) . "'>" . _x( 'Not Spam', 'comment' ) . '</a>';
573 if ( 'trash' === $the_comment_status ) {
574 $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' aria-label='" . esc_attr__( 'Restore this comment from the Trash' ) . "'>" . __( 'Restore' ) . '</a>';
577 if ( 'spam' === $the_comment_status || 'trash' === $the_comment_status || !EMPTY_TRASH_DAYS ) {
578 $actions['delete'] = "<a href='$delete_url' data-wp-lists='delete:the-comment-list:comment-$comment->comment_ID::delete=1' class='delete vim-d vim-destructive' aria-label='" . esc_attr__( 'Delete this comment permanently' ) . "'>" . __( 'Delete Permanently' ) . '</a>';
580 $actions['trash'] = "<a href='$trash_url' data-wp-lists='delete:the-comment-list:comment-$comment->comment_ID::trash=1' class='delete vim-d vim-destructive' aria-label='" . esc_attr__( 'Move this comment to the Trash' ) . "'>" . _x( 'Trash', 'verb' ) . '</a>';
583 if ( 'spam' !== $the_comment_status && 'trash' !== $the_comment_status ) {
584 $actions['edit'] = "<a href='comment.php?action=editcomment&c={$comment->comment_ID}' aria-label='" . esc_attr__( 'Edit this comment' ) . "'>". __( 'Edit' ) . '</a>';
586 $format = '<a data-comment-id="%d" data-post-id="%d" data-action="%s" class="%s" aria-label="%s" href="#">%s</a>';
588 $actions['quickedit'] = sprintf( $format, $comment->comment_ID, $comment->comment_post_ID, 'edit', 'vim-q comment-inline', esc_attr__( 'Quick edit this comment inline' ), __( 'Quick Edit' ) );
590 $actions['reply'] = sprintf( $format, $comment->comment_ID, $comment->comment_post_ID, 'replyto', 'vim-r comment-inline', esc_attr__( 'Reply to this comment' ), __( 'Reply' ) );
593 /** This filter is documented in wp-admin/includes/dashboard.php */
594 $actions = apply_filters( 'comment_row_actions', array_filter( $actions ), $comment );
597 $out .= '<div class="row-actions">';
598 foreach ( $actions as $action => $link ) {
600 ( ( ( 'approve' === $action || 'unapprove' === $action ) && 2 === $i ) || 1 === $i ) ? $sep = '' : $sep = ' | ';
602 // Reply and quickedit need a hide-if-no-js span when not added with ajax
603 if ( ( 'reply' === $action || 'quickedit' === $action ) && ! wp_doing_ajax() )
604 $action .= ' hide-if-no-js';
605 elseif ( ( $action === 'untrash' && $the_comment_status === 'trash' ) || ( $action === 'unspam' && $the_comment_status === 'spam' ) ) {
606 if ( '1' == get_comment_meta( $comment->comment_ID, '_wp_trash_meta_status', true ) )
607 $action .= ' approve';
609 $action .= ' unapprove';
612 $out .= "<span class='$action'>$sep$link</span>";
616 $out .= '<button type="button" class="toggle-row"><span class="screen-reader-text">' . __( 'Show more details' ) . '</span></button>';
623 * @param WP_Comment $comment The comment object.
625 public function column_cb( $comment ) {
626 if ( $this->user_can ) { ?>
627 <label class="screen-reader-text" for="cb-select-<?php echo $comment->comment_ID; ?>"><?php _e( 'Select comment' ); ?></label>
628 <input id="cb-select-<?php echo $comment->comment_ID; ?>" type="checkbox" name="delete_comments[]" value="<?php echo $comment->comment_ID; ?>" />
634 * @param WP_Comment $comment The comment object.
636 public function column_comment( $comment ) {
637 echo '<div class="comment-author">';
638 $this->column_author( $comment );
641 if ( $comment->comment_parent ) {
642 $parent = get_comment( $comment->comment_parent );
644 $parent_link = esc_url( get_comment_link( $parent ) );
645 $name = get_comment_author( $parent );
647 /* translators: %s: comment link */
648 __( 'In reply to %s.' ),
649 '<a href="' . $parent_link . '">' . $name . '</a>'
654 comment_text( $comment );
655 if ( $this->user_can ) { ?>
656 <div id="inline-<?php echo $comment->comment_ID; ?>" class="hidden">
657 <textarea class="comment" rows="1" cols="1"><?php
658 /** This filter is documented in wp-admin/includes/comment.php */
659 echo esc_textarea( apply_filters( 'comment_edit_pre', $comment->comment_content ) );
661 <div class="author-email"><?php echo esc_attr( $comment->comment_author_email ); ?></div>
662 <div class="author"><?php echo esc_attr( $comment->comment_author ); ?></div>
663 <div class="author-url"><?php echo esc_attr( $comment->comment_author_url ); ?></div>
664 <div class="comment_status"><?php echo $comment->comment_approved; ?></div>
672 * @global string $comment_status
674 * @param WP_Comment $comment The comment object.
676 public function column_author( $comment ) {
677 global $comment_status;
679 $author_url = get_comment_author_url( $comment );
681 $author_url_display = untrailingslashit( preg_replace( '|^http(s)?://(www\.)?|i', '', $author_url ) );
682 if ( strlen( $author_url_display ) > 50 ) {
683 $author_url_display = wp_html_excerpt( $author_url_display, 49, '…' );
686 echo "<strong>"; comment_author( $comment ); echo '</strong><br />';
687 if ( ! empty( $author_url_display ) ) {
688 printf( '<a href="%s">%s</a><br />', esc_url( $author_url ), esc_html( $author_url_display ) );
691 if ( $this->user_can ) {
692 if ( ! empty( $comment->comment_author_email ) ) {
693 /* This filter is documented in wp-includes/comment-template.php */
694 $email = apply_filters( 'comment_email', $comment->comment_author_email, $comment );
696 if ( ! empty( $email ) && '@' !== $email ) {
697 printf( '<a href="%1$s">%2$s</a><br />', esc_url( 'mailto:' . $email ), esc_html( $email ) );
701 $author_ip = get_comment_author_IP( $comment );
703 $author_ip_url = add_query_arg( array( 's' => $author_ip, 'mode' => 'detail' ), admin_url( 'edit-comments.php' ) );
704 if ( 'spam' === $comment_status ) {
705 $author_ip_url = add_query_arg( 'comment_status', 'spam', $author_ip_url );
707 printf( '<a href="%1$s">%2$s</a>', esc_url( $author_ip_url ), esc_html( $author_ip ) );
715 * @param WP_Comment $comment The comment object.
717 public function column_date( $comment ) {
718 /* translators: 1: comment date, 2: comment time */
719 $submitted = sprintf( __( '%1$s at %2$s' ),
720 /* translators: comment date format. See https://secure.php.net/date */
721 get_comment_date( __( 'Y/m/d' ), $comment ),
722 get_comment_date( __( 'g:i a' ), $comment )
725 echo '<div class="submitted-on">';
726 if ( 'approved' === wp_get_comment_status( $comment ) && ! empty ( $comment->comment_post_ID ) ) {
728 '<a href="%s">%s</a>',
729 esc_url( get_comment_link( $comment ) ),
741 * @param WP_Comment $comment The comment object.
743 public function column_response( $comment ) {
750 if ( isset( $this->pending_count[$post->ID] ) ) {
751 $pending_comments = $this->pending_count[$post->ID];
753 $_pending_count_temp = get_pending_comments_num( array( $post->ID ) );
754 $pending_comments = $this->pending_count[$post->ID] = $_pending_count_temp[$post->ID];
757 if ( current_user_can( 'edit_post', $post->ID ) ) {
758 $post_link = "<a href='" . get_edit_post_link( $post->ID ) . "' class='comments-edit-item-link'>";
759 $post_link .= esc_html( get_the_title( $post->ID ) ) . '</a>';
761 $post_link = esc_html( get_the_title( $post->ID ) );
764 echo '<div class="response-links">';
765 if ( 'attachment' === $post->post_type && ( $thumb = wp_get_attachment_image( $post->ID, array( 80, 60 ), true ) ) ) {
769 $post_type_object = get_post_type_object( $post->post_type );
770 echo "<a href='" . get_permalink( $post->ID ) . "' class='comments-view-item-link'>" . $post_type_object->labels->view_item . '</a>';
771 echo '<span class="post-com-count-wrapper post-com-count-', $post->ID, '">';
772 $this->comments_bubble( $post->ID, $pending_comments );
779 * @param WP_Comment $comment The comment object.
780 * @param string $column_name The custom column's name.
782 public function column_default( $comment, $column_name ) {
784 * Fires when the default column output is displayed for a single row.
788 * @param string $column_name The custom column's name.
789 * @param int $comment->comment_ID The custom column's unique ID number.
791 do_action( 'manage_comments_custom_column', $column_name, $comment->comment_ID );