WP_Comments_List_Table::column_cb()publicWP 5.9.0

Метод класса: WP_Comments_List_Table{}

Хуков нет.

Возвращает

null. Ничего (null).

Использование

$WP_Comments_List_Table = new WP_Comments_List_Table();
$WP_Comments_List_Table->column_cb( $item );
$item(WP_Comment) (обязательный)
The comment object.

Список изменений

С версии 5.9.0 Введена.
С версии 5.9.0 Renamed $comment to $item to match parent class for PHP 8 named parameter support.

Код WP_Comments_List_Table::column_cb() WP 6.4.3

<?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
	}
}