comment_url
Filters the comment author's URL for display.
Usage
add_filter( 'comment_url', 'wp_kama_comment_url_filter', 10, 2 ); /** * Function for `comment_url` filter-hook. * * @param string $comment_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( $comment_author_url, $comment_id ){ // filter... return $comment_author_url; }
- $comment_author_url(string)
- The comment author's URL.
- $comment_id(string)
- The comment ID as a numeric string.
Changelog
Since 1.2.0 | Introduced. |
Since 4.1.0 | The $comment_id parameter was added. |
Where the hook is called
comment_url
wp-includes/comment-template.php 401
echo apply_filters( 'comment_url', $comment_author_url, $comment->comment_ID );
Where the hook is used in 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' );