get_comment_ID

Advertisement

Summery Summery

Retrieves the comment id of the current comment.

Syntax Syntax

get_comment_ID()

Return Return

(int) The comment ID.

Source Source

File: wp-includes/comment-template.php

 * Retrieves the comment ID of the current comment.
 *
 * @since 1.5.0
 *
 * @return int The comment ID.
 */
function get_comment_ID() { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionNameInvalid
	$comment = get_comment();

	/**
	 * Filters the returned comment ID.
	 *
	 * @since 1.5.0
	 * @since 4.1.0 The `$comment_ID` parameter was added.

Advertisement

Changelog Changelog

Changelog
Version Description
1.5.0 Introduced.

Advertisement

Leave a Reply