comment_id_fields

The timeline below displays how wordpress function comment_id_fields has changed across different WordPress versions. If a version is not listed, refer to the next available version below.

WordPress Version: 6.2

/**
 * Outputs 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.
 *
 * @since 2.7.0
 * @since 6.2.0 Renamed `$post_id` to `$post` and added WP_Post support.
 *
 * @see get_comment_id_fields()
 *
 * @param int|WP_Post|null $post Optional. The post the comment is being displayed for.
 *                               Defaults to the current global post.
 */
function comment_id_fields($post = null)
{
    echo get_comment_id_fields($post);
}

WordPress Version: 5.5

/**
 * Outputs 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.
 *
 * @since 2.7.0
 *
 * @see get_comment_id_fields()
 *
 * @param int $post_id Optional. Post ID. Defaults to the current post ID.
 */
function comment_id_fields($post_id = 0)
{
    echo get_comment_id_fields($post_id);
}

WordPress Version: 5.4

/**
 * Outputs hidden input HTML for replying to comments.
 *
 * @since 2.7.0
 *
 * @param int $id Optional. Post ID. Default current post ID.
 */
function comment_id_fields($id = 0)
{
    echo get_comment_id_fields($id);
}

WordPress Version: 3.7

/**
 * Output hidden input HTML for replying to comments.
 *
 * @since 2.7.0
 *
 * @param int $id Optional. Post ID. Default current post ID.
 */
function comment_id_fields($id = 0)
{
    echo get_comment_id_fields($id);
}