WordPress at a glance

comment_id_fields() WP 1.0

Output hidden input HTML for replying to comments.

Adds two hidden inputs to the comment form to identify the comment_post_ID and comment_parent values for threaded comments.

This tag must be within the <form> section of the comments.php template.

Works based on: get_comment_id_fields()

No Hooks.

Return

Null. Nothing.

Usage

comment_id_fields( $post_id );
$post_id(int)
Post ID.
Default: current post ID

Notes

  • See: get_comment_id_fields()

Changelog

Since 2.7.0 Introduced.

Code of comment_id_fields() WP 5.5.1

<?php
function comment_id_fields( $post_id = 0 ) {
	echo get_comment_id_fields( $post_id );
}

From category: Comments

No comments
    Log In . Register