WP_Comments_List_Table::column_cb()
Method of the class: WP_Comments_List_Table{}
No Hooks.
Return
null
. Nothing.
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.1.1
<?php public function column_cb( $item ) { // Restores the more descriptive, specific name for use within this method. $comment = $item; if ( $this->user_can ) { ?> <label class="screen-reader-text" for="cb-select-<?php echo $comment->comment_ID; ?>"><?php _e( 'Select comment' ); ?></label> <input id="cb-select-<?php echo $comment->comment_ID; ?>" type="checkbox" name="delete_comments[]" value="<?php echo $comment->comment_ID; ?>" /> <?php } }