Automattic\WooCommerce\Internal\Admin\ProductReviews
ReviewsListTable::column_comment()
Renders the review column.
Метод класса: ReviewsListTable{}
Хуков нет.
Возвращает
null
. Ничего (null).
Использование
// protected - в коде основоного (родительского) или дочернего класса $result = $this->column_comment( $item ) : void;
- $item(WP_Comment|разное) (обязательный)
- Review or reply being rendered.
Заметки
- Смотрите: WP_Comments_List_Table::column_comment() for consistency.
Код ReviewsListTable::column_comment() ReviewsListTable::column comment WC 8.1.1
<?php protected function column_comment( $item ) : void { $in_reply_to = $this->get_in_reply_to_review_text( $item ); ob_start(); if ( $in_reply_to ) { echo $in_reply_to . '<br><br>'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped } printf( '%1$s%2$s%3$s', '<div class="comment-text">', get_comment_text( $item->comment_ID ), // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped '</div>' ); if ( $this->current_user_can_edit_review ) { ?> <div id="inline-<?php echo esc_attr( $item->comment_ID ); ?>" class="hidden"> <textarea class="comment" rows="1" cols="1"><?php echo esc_textarea( $item->comment_content ); ?></textarea> <div class="author-email"><?php echo esc_attr( $item->comment_author_email ); ?></div> <div class="author"><?php echo esc_attr( $item->comment_author ); ?></div> <div class="author-url"><?php echo esc_attr( $item->comment_author_url ); ?></div> <div class="comment_status"><?php echo esc_html( $item->comment_approved ); ?></div> </div> <?php } echo $this->filter_column_output( 'comment', ob_get_clean(), $item ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped }