comment_ID() WordPress Function

The comment_ID() function is used to retrieve the comment ID for a given comment. This function can be useful for retrieving the ID of a specific comment, or for displaying the ID of a comment in the front-end.

comment_ID() #

Displays the comment ID of the current comment.


Source

File: wp-includes/comment-template.php

function comment_ID() { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionNameInvalid
	echo get_comment_ID();
}


Top ↑

Changelog

Changelog
VersionDescription
0.71Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More
Show More