get_comment_author_url()
Retrieve the url of the author of the current comment.
Hooks from the function
Return
String
. Comment author URL, if provided, an empty string otherwise.
Usage
get_comment_author_url( $comment_id );
- $comment_id(int|WP_Comment)
- WP_Comment or the ID of the comment for which to get the author's URL.
Default: current comment
Examples
#1 Get the URL of the comment author
$comment_author = get_comment_author_url(); echo $comment_author; // Returns: http://example.com
Changelog
Since 1.5.0 | Introduced. |
Since 4.4.0 | Added the ability for $comment_id to also accept a WP_Comment object. |