Automattic\WooCommerce\Internal\Admin\ProductReviews
ReviewsListTable::column_cb()
Renders the checkbox column.
Метод класса: ReviewsListTable{}
Хуков нет.
Возвращает
null
. Ничего (null).
Использование
// protected - в коде основоного (родительского) или дочернего класса $result = $this->column_cb( $item ) : void;
- $item(WP_Comment|разное) (обязательный)
- Review or reply being rendered.
Код ReviewsListTable::column_cb() ReviewsListTable::column cb WC 8.3.1
<?php protected function column_cb( $item ) : void { ob_start(); if ( $this->current_user_can_edit_review ) { ?> <label class="screen-reader-text" for="cb-select-<?php echo esc_attr( $item->comment_ID ); ?>"><?php esc_html_e( 'Select review', 'woocommerce' ); ?></label> <input id="cb-select-<?php echo esc_attr( $item->comment_ID ); ?>" type="checkbox" name="delete_comments[]" value="<?php echo esc_attr( $item->comment_ID ); ?>" /> <?php } echo $this->filter_column_output( 'cb', ob_get_clean(), $item ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped }