Automattic\WooCommerce\Internal\Admin\ProductReviews
ReviewsListTable::column_response
Метод класса: ReviewsListTable{}
Хуков нет.
Возвращает
null
. Ничего (null).
Использование
$ReviewsListTable = new ReviewsListTable(); $ReviewsListTable->echo $this->filter_column_output( foo, ob_get_clean(), $item );
- foo(обязательный)
- .
- ob_get_clean()(обязательный)
- .
- $item(обязательный)
- .
Код ReviewsListTable::column_response() ReviewsListTable::column response WC 9.9.4
<?php echo $this->filter_column_output( 'date', ob_get_clean(), $item ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped } /** * Renders the product column. * * @see WP_Comments_List_Table::column_response() for consistency. * * @param WP_Comment|mixed $item Review or reply being rendered. * @return void */ 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 ); ?>