WordPress.org

Ready to get started?Download WordPress

Codex

Function Reference/get comment author

This page is marked as incomplete. You can help Codex by expanding it.

Contents

Description

Retrieve the author of the current comment. If the comment has an empty comment_author field, then 'Anonymous' person is assumed. This function is meant to live inside of the WordPress loop.

Usage

<?php $author get_comment_author$comment_ID ); ?>

Parameters

$comment_ID
(integer) (optionl) The ID of the comment for which to retrieve the author.
Default: None

Return Values

(string) 
The comment author

Examples

Notes

Change Log

Since: 1.5.0

Source File

get_comment_author() is located in wp-includes/comment-template.php

Related