comment_url хук-фильтрWP 1.2.0

Filters the comment author's URL for display.

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

add_filter( 'comment_url', 'wp_kama_comment_url_filter', 10, 2 );

/**
 * Function for `comment_url` filter-hook.
 * 
 * @param string $author_url The comment author's URL.
 * @param string $comment_ID The comment ID as a numeric string.
 *
 * @return string
 */
function wp_kama_comment_url_filter( $author_url, $comment_ID ){

	// filter...
	return $author_url;
}
$author_url(строка)
The comment author's URL.
$comment_ID(строка)
The comment ID as a numeric string.

Список изменений

С версии 1.2.0 Введена.
С версии 4.1.0 The $comment_ID parameter was added.

Где вызывается хук

comment_author_url()
comment_url
wp-includes/comment-template.php 353
echo apply_filters( 'comment_url', $author_url, $comment->comment_ID );

Где используется хук в WordPress

wp-includes/default-filters.php 82
add_filter( $filter, 'wp_strip_all_tags' );
wp-includes/default-filters.php 84
add_filter( $filter, 'esc_url' );
wp-includes/default-filters.php 86
add_filter( $filter, 'wp_kses_data' );