Automattic\WooCommerce\Internal\Admin\Logging\FileV2
FileListTable::column_cb
Render the checkbox column.
Method of the class: FileListTable{}
No Hooks.
Returns
String.
Usage
$FileListTable = new FileListTable(); $FileListTable->column_cb( $item ): string;
- $item(File) (required)
- The current log file being rendered.
FileListTable::column_cb() FileListTable::column cb code WC 10.8.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();
}