WP_Comments_List_Table::column_cb()
Method of the class: WP_Comments_List_Table{}
No Hooks.
Return
null
. Nothing (null).
Usage
$WP_Comments_List_Table = new WP_Comments_List_Table(); $WP_Comments_List_Table->column_cb( $item );
- $item(WP_Comment) (required)
- The comment object.
Changelog
Since 5.9.0 | Introduced. |
Since 5.9.0 | Renamed $comment to $item to match parent class for PHP 8 named parameter support. |
WP_Comments_List_Table::column_cb() WP Comments List Table::column cb code WP 6.5.2
<?php public function column_cb( $item ) { // Restores the more descriptive, specific name for use within this method. $comment = $item; if ( $this->user_can ) { ?> <input id="cb-select-<?php echo $comment->comment_ID; ?>" type="checkbox" name="delete_comments[]" value="<?php echo $comment->comment_ID; ?>" /> <label for="cb-select-<?php echo $comment->comment_ID; ?>"> <span class="screen-reader-text"> <?php /* translators: Hidden accessibility text. */ _e( 'Select comment' ); ?> </span> </label> <?php } }