comment_author_IP() – Display the IP address of the author of the current comment.

You appear to be a bot. Output may be restricted

Description

Displays the IP address of the author of the current comment.

Usage

comment_author_IP( $comment_ID );

Parameters

$comment_ID
( int|WP_Comment ) optional – Optional. WP_Comment or the ID of the comment for which to print the author's IP address. Default current comment.

Returns

void

Source

File name: wordpress/wp-includes/comment-template.php
Lines:

1 to 3 of 3
function comment_author_IP( $comment_ID = 0 ) { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionNameInvalid
  echo esc_html( get_comment_author_IP( $comment_ID ) );
}
 

 View on GitHub View on Trac