Automattic\WooCommerce\Internal\Admin\Logging\FileV2

FileListTable::column_cb()publicWC 1.0

Render the checkbox column.

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

Хуков нет.

Возвращает

Строку.

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

$FileListTable = new FileListTable();
$FileListTable->column_cb( $item ): string;
$item(File) (обязательный)
The current log file being rendered.

Код FileListTable::column_cb() WC 9.7.1

<?php
public function column_cb( $item ): string {
	ob_start();
	?>
	<input
		id="cb-select-<?php echo esc_attr( $item->get_file_id() ); ?>"
		type="checkbox"
		name="file_id[]"
		value="<?php echo esc_attr( $item->get_file_id() ); ?>"
	/>
	<label for="cb-select-<?php echo esc_attr( $item->get_file_id() ); ?>">
		<span class="screen-reader-text">
			<?php
			printf(
				// translators: 1. a date, 2. a slug-style name for a file.
				esc_html__( 'Select the %1$s log file for %2$s', 'woocommerce' ),
				esc_html( gmdate( get_option( 'date_format' ), $item->get_created_timestamp() ) ),
				esc_html( $item->get_source() )
			);
			?>
		</span>
	</label>
	<?php
	return ob_get_clean();
}