Automattic\WooCommerce\Internal\Admin\ProductReviews

ReviewsListTable::get_item_author_url_for_display()privateWC 1.0

Gets the item author URL for display.

Метод класса: ReviewsListTable{}

Хуков нет.

Возвращает

Строку.

Использование

// private - только в коде основоного (родительского) класса
$result = $this->get_item_author_url_for_display( $author_url ) : string;
$author_url(строка) (обязательный)
The review or reply author URL (raw).

Код ReviewsListTable::get_item_author_url_for_display() WC 8.7.0

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;
}