Codex

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

Function Reference/comment id fields

This page redirects to an external site: https://developer.wordpress.org/reference/functions/comment_id_fields/

Description

Generates two hidden inputs for the comment form to identify the comment_post_ID and comment_parent for threaded comments. This tag must be within the <form> section of comments.php.

Usage

<code style="color: #000000"> <span style="color: #0000BB"><?php comment_id_fields</span><span style="color: #007700">( </span><span style="color: #0000BB">$id </span><span style="color: #007700">); </span><span style="color: #0000BB">?></span> </code>

Default Usage

<code style="color: #000000"> <span style="color: #0000BB"><?php comment_id_fields</span><span style="color: #007700">(); </span><span style="color: #0000BB">?></span> </code>

Parameters

$id
(integer) (optional) A comment's ID. There is no need to pass this parameter when this function is used within The Loop. When empty the current comment will be displayed.
Default: 0

Return Values

This function does not return a value.

Examples

See the source of comment_form() as an example of usage within a comment form.

Notes

Change Log

Source File

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

Related

Comments Functions

See also index of Function Reference and index of Template Tags.
This page is marked as incomplete. You can help Codex by expanding it.