get_comment_author_url
Filters the comment author's URL.
Использование
add_filter( 'get_comment_author_url', 'wp_kama_get_comment_author_url_filter', 10, 3 ); /** * Function for `get_comment_author_url` filter-hook. * * @param string $url The comment author's URL, or an empty string. * @param string|int $comment_ID The comment ID as a numeric string, or 0 if not found. * @param WP_Comment|null $comment The comment object, or null if not found. * * @return string */ function wp_kama_get_comment_author_url_filter( $url, $comment_ID, $comment ){ // filter... return $url; }
- $url(строка)
- The comment author's URL, or an empty string.
- $comment_ID(строка|int)
- The comment ID as a numeric string, or 0 if not found.
- $comment(WP_Comment|null)
- The comment object, or null if not found.
Список изменений
С версии 1.5.0 | Введена. |
С версии 4.1.0 | The $comment_ID and $comment parameters were added. |
Где вызывается хук
get_comment_author_url
wp-includes/comment-template.php 328
return apply_filters( 'get_comment_author_url', $url, $id, $comment );