WordPress.org

Codex

Attention Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Template Tags/get comment author IP

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

Description

Retrieve the IP address of the author of the current comment rather than echo it.

Usage

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

Parameters

$comment_ID
(integer) (optional) ID of the comment for which to get the author's IP address.
Default: 0 (current comment)

Return Values

(string) 
The comment author's IP address

Examples

Filters

apply_filters() Calls 'get_comment_author_IP' hook on the author's IP address.

Change Log

Since: 1.5.0

Source File

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

Related