comment_id_fields()
Проверено на WordPress 6.9, обновлено Источник: WordPress Developer Resources.
Сигнатура
comment_id_fields( int|WP_Post|null $post = null )
Описание
Добавляет в форму комментария два скрытых поля ввода для определения значений comment_post_ID и comment_parent при древовидных комментариях.
Этот тег должен находиться внутри секции
См. alsoget_comment_id_fields()
Оригинал (английский)
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.
Параметры
$post
int|WP_Post|null
необязательный
= null
Исходный код
wp-includes/comment-template.php:2086
function comment_id_fields( $post = null ) {
echo get_comment_id_fields( $post );
}
История изменений
| Версия | Описание |
|---|---|
| 6.2.0 | Renamed $post_id to $post and added WP_Post support. |
| 2.7.0 | Introduced. |

