get_comment_author() WP 1.0
Retrieve the author of the current comment.
If the comment has an empty comment_author field, then 'Anonymous' person is assumed.
Works based on: get_comment()
Basis of: get_comment_author_link(), comment_author()
Hooks from the function
Return
String. The comment author
Usage
get_comment_author( $comment_ID );
- $comment_ID(int/WP_Comment)
- WP_Comment or the ID of the comment for which to retrieve the author.
Default: current comment
Changelog
Since 1.5.0 | Introduced. |
Since 4.4.0 | Added the ability for $comment_ID to also accept a WP_Comment object. |
Code of get_comment_author() get comment author WP 5.6
Related Functions
From tag: Comments
- comment_link()
- comments_template()
- get_comment_author_link()
- get_comment_author_url()
- get_comment_excerpt()
- get_comment_link()