Automattic\WooCommerce\Internal\Admin\ProductReviews
ReviewsListTable::column_response()
Renders the product column.
Метод класса: ReviewsListTable{}
Хуков нет.
Возвращает
null
. Ничего.
Использование
// protected - в коде основоного (родительского) или дочернего класса $result = $this->column_response( $item ) : void;
- $item(WP_Comment|разное) (обязательный)
- Review or reply being rendered.
Заметки
- Смотрите: WP_Comments_List_Table::column_response() for consistency.
Код ReviewsListTable::column_response() ReviewsListTable::column response WC 7.5.1
<?php protected function column_response( $item ) : void { $product_post = get_post(); ob_start(); if ( $product_post ) : ?> <div class="response-links"> <?php if ( current_user_can( 'edit_product', $product_post->ID ) ) : $post_link = "<a href='" . esc_url( get_edit_post_link( $product_post->ID ) ) . "' class='comments-edit-item-link'>"; $post_link .= esc_html( get_the_title( $product_post->ID ) ) . '</a>'; else : $post_link = esc_html( get_the_title( $product_post->ID ) ); endif; echo $post_link; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped $post_type_object = get_post_type_object( $product_post->post_type ); ?> <a href="<?php echo esc_url( get_permalink( $product_post->ID ) ); ?>" class="comments-view-item-link"> <?php echo esc_html( $post_type_object->labels->view_item ); ?> </a> <span class="post-com-count-wrapper post-com-count-<?php echo esc_attr( $product_post->ID ); ?>"> <?php $this->comments_bubble( $product_post->ID, get_pending_comments_num( $product_post->ID ) ); ?> </span> </div> <?php endif; echo $this->filter_column_output( 'response', ob_get_clean(), $item ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped }