Automattic\WooCommerce\Internal\Admin\ProductReviews
ReviewsListTable::get_in_reply_to_review_text()
Gets the in-reply-to-review text.
Method of the class: ReviewsListTable{}
No Hooks.
Return
String
.
Usage
// private - for code of main (parent) class only $result = $this->get_in_reply_to_review_text( $reply ) : string;
- $reply(WP_Comment|mixed) (required)
- Reply to review.
ReviewsListTable::get_in_reply_to_review_text() ReviewsListTable::get in reply to review text code WC 9.6.1
private function get_in_reply_to_review_text( $reply ) : string { $review = $reply->comment_parent ? get_comment( $reply->comment_parent ) : null; if ( ! $review ) { return ''; } $parent_review_link = get_comment_link( $review ); $review_author_name = get_comment_author( $review ); return sprintf( /* translators: %s: Parent review link with review author name. */ ent2ncr( __( 'In reply to %s.', 'woocommerce' ) ), '<a href="' . esc_url( $parent_review_link ) . '">' . esc_html( $review_author_name ) . '</a>' ); }