comment_id_fields()
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.
Uses: get_comment_id_fields()
No Hooks.
Return
null
. Nothing.
Usage
comment_id_fields( $post_id );
- $post_id(int)
- Post ID.
Default: current post ID
Examples
#1 Usage example
comment_id_fields()
Display:
<input type='hidden' name='comment_post_ID' value='119' id='comment_post_ID' /> <input type='hidden' name='comment_parent' id='comment_parent' value='251' />
Notes
Changelog
Since 2.7.0 | Introduced. |
comment_id_fields() comment id fields code WP 6.1.1
function comment_id_fields( $post_id = 0 ) { echo get_comment_id_fields( $post_id ); }