I’m working on a custom plugin that needs to display specifically the commenter’s nice name. The codex shows how to do this for the logged in user but not someone else. Can this easily be done?
Leave a Reply
You must be logged in to post a comment.
I’m working on a custom plugin that needs to display specifically the commenter’s nice name. The codex shows how to do this for the logged in user but not someone else. Can this easily be done?
You must be logged in to post a comment.
wp_get_current_commenter()
returns an array, the entry'comment_author'
stores the name:More information is available in the codex.
Update
To find the nice name, ask the DB:
Caveat: Not tested. 🙂
Don’t they need to be registered to even get a nice name? Otherwise it’d be whatever they provide when making the comment.