Automattic\WooCommerce\Internal\Admin\ProductReviews

ReviewsListTable::get_item_author_url_for_display()privateWC 1.0

Gets the item author URL for display.

Method of the class: ReviewsListTable{}

No Hooks.

Return

String.

Usage

// private - for code of main (parent) class only
$result = $this->get_item_author_url_for_display( $author_url ) : string;
$author_url(string) (required)
The review or reply author URL (raw).

ReviewsListTable::get_item_author_url_for_display() code WC 7.1.1

private function get_item_author_url_for_display( $author_url ) : string {

	$author_url_display = untrailingslashit( preg_replace( '|^http(s)?://(www\.)?|i', '', $author_url ) );

	if ( strlen( $author_url_display ) > 50 ) {
		$author_url_display = wp_html_excerpt( $author_url_display, 49, '…' );
	}

	return $author_url_display;
}