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 $comment_author_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( $comment_author_url, $comment_id, $comment ){ // filter... return $comment_author_url; }
- $comment_author_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 381
return apply_filters( 'get_comment_author_url', $comment_author_url, $comment_id, $comment );