Title: wp-includes/comment-template.php | Developer.WordPress.org

---

# File: wp-includes/comment-template.php

 * function[_get_comment_reply_id()](https://developer.wordpress.org/reference/functions/_get_comment_reply_id/)
 * Gets the comment’s reply to ID from the $_GET[‘replytocom’].
 * Used by [3 functions](https://developer.wordpress.org/reference/functions/_get_comment_reply_id/#used-by)
   | Uses [2 functions](https://developer.wordpress.org/reference/functions/_get_comment_reply_id/#uses)
   | Source: [wp-includes/comment-template.php:2165](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/comment-template.php#L2165-L2190)
 * hook[comment_author_link_rel](https://developer.wordpress.org/reference/hooks/comment_author_link_rel/)
 * Filters the rel attributes of the comment author’s link.
 * Used by [1 function](https://developer.wordpress.org/reference/hooks/comment_author_link_rel/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/hooks/comment_author_link_rel/#uses)
   | Source: [wp-includes/comment-template.php:267](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/comment-template.php#L267-L267)
 * hook[comments_template_top_level_query_args](https://developer.wordpress.org/reference/hooks/comments_template_top_level_query_args/)
 * Filters the arguments used in the top level comments query.
 * Used by [1 function](https://developer.wordpress.org/reference/hooks/comments_template_top_level_query_args/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/hooks/comments_template_top_level_query_args/#uses)
   | Source: [wp-includes/comment-template.php:1524](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/comment-template.php#L1524-L1524)
 * hook[comments_template_query_args](https://developer.wordpress.org/reference/hooks/comments_template_query_args/)
 * Filters the arguments used to query comments in comments_template().
 * Used by [1 function](https://developer.wordpress.org/reference/hooks/comments_template_query_args/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/hooks/comments_template_query_args/#uses)
   | Source: [wp-includes/comment-template.php:1555](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/comment-template.php#L1555-L1555)
 * hook[comment_form_fields](https://developer.wordpress.org/reference/hooks/comment_form_fields/)
 * Filters the comment form fields, including the textarea.
 * Used by [1 function](https://developer.wordpress.org/reference/hooks/comment_form_fields/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/hooks/comment_form_fields/#uses)
   | Source: [wp-includes/comment-template.php:2788](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/comment-template.php#L2788-L2788)
 * hook[respond_link](https://developer.wordpress.org/reference/hooks/respond_link/)
 * Filters the respond link when a post has no comments.
 * Used by [1 function](https://developer.wordpress.org/reference/hooks/respond_link/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/hooks/respond_link/#uses)
   | Source: [wp-includes/comment-template.php:1698](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/comment-template.php#L1698-L1698)
 * hook[comment_excerpt_length](https://developer.wordpress.org/reference/hooks/comment_excerpt_length/)
 * Filters the maximum number of words used in the comment excerpt.
 * Used by [1 function](https://developer.wordpress.org/reference/hooks/comment_excerpt_length/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/hooks/comment_excerpt_length/#uses)
   | Source: [wp-includes/comment-template.php:677](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/comment-template.php#L677-L677)
 * hook[comment_form_submit_button](https://developer.wordpress.org/reference/hooks/comment_form_submit_button/)
 * Filters the submit button for the comment form to display.
 * Used by [1 function](https://developer.wordpress.org/reference/hooks/comment_form_submit_button/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/hooks/comment_form_submit_button/#uses)
   | Source: [wp-includes/comment-template.php:2870](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/comment-template.php#L2870-L2870)
 * hook[comment_form_submit_field](https://developer.wordpress.org/reference/hooks/comment_form_submit_field/)
 * Filters the submit field for the comment form to display.
 * Used by [1 function](https://developer.wordpress.org/reference/hooks/comment_form_submit_field/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/hooks/comment_form_submit_field/#uses)
   | Source: [wp-includes/comment-template.php:2889](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/comment-template.php#L2889-L2889)
 * hook[comment_reply_link_args](https://developer.wordpress.org/reference/hooks/comment_reply_link_args/)
 * Filters the comment reply link arguments.
 * Used by [1 function](https://developer.wordpress.org/reference/hooks/comment_reply_link_args/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/hooks/comment_reply_link_args/#uses)
   | Source: [wp-includes/comment-template.php:1812](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/comment-template.php#L1812-L1812)
 * hook[wp_list_comments_args](https://developer.wordpress.org/reference/hooks/wp_list_comments_args/)
 * Filters the arguments used in retrieving the comment list.
 * Used by [1 function](https://developer.wordpress.org/reference/hooks/wp_list_comments_args/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/hooks/wp_list_comments_args/#uses)
   | Source: [wp-includes/comment-template.php:2271](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/comment-template.php#L2271-L2271)
 * function[get_comments_number_text()](https://developer.wordpress.org/reference/functions/get_comments_number_text/)
 * Displays the language string for the number of comments the current post has.
 * Used by [2 functions](https://developer.wordpress.org/reference/functions/get_comments_number_text/#used-by)
   | Uses [6 functions](https://developer.wordpress.org/reference/functions/get_comments_number_text/#uses)
   | Source: [wp-includes/comment-template.php:959](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/comment-template.php#L959-L1013)
 * hook[comment_form_logged_in](https://developer.wordpress.org/reference/hooks/comment_form_logged_in/)
 * Filters the ‘logged in’ message for the comment form for display.
 * Used by [1 function](https://developer.wordpress.org/reference/hooks/comment_form_logged_in/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/hooks/comment_form_logged_in/#uses)
   | Source: [wp-includes/comment-template.php:2758](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/comment-template.php#L2758-L2758)
 * hook[comment_form_logged_in_after](https://developer.wordpress.org/reference/hooks/comment_form_logged_in_after/)
 * Fires after the is_user_logged_in() check in the comment form.
 * Used by [1 function](https://developer.wordpress.org/reference/hooks/comment_form_logged_in_after/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/hooks/comment_form_logged_in_after/#uses)
   | Source: [wp-includes/comment-template.php:2770](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/comment-template.php#L2770-L2770)
 * hook[comment_form_before_fields](https://developer.wordpress.org/reference/hooks/comment_form_before_fields/)
 * Fires before the comment fields in the comment form, excluding the textarea.
 * Used by [1 function](https://developer.wordpress.org/reference/hooks/comment_form_before_fields/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/hooks/comment_form_before_fields/#uses)
   | Source: [wp-includes/comment-template.php:2820](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/comment-template.php#L2820-L2820)
 * hook[comment_form_field_{$name}](https://developer.wordpress.org/reference/hooks/comment_form_field_name/)
 * Filters a comment form field for display.
 * Used by [1 function](https://developer.wordpress.org/reference/hooks/comment_form_field_name/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/hooks/comment_form_field_name/#uses)
   | Source: [wp-includes/comment-template.php:2841](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/comment-template.php#L2841-L2841)
 * hook[comment_form_after_fields](https://developer.wordpress.org/reference/hooks/comment_form_after_fields/)
 * Fires after the comment fields in the comment form, excluding the textarea.
 * Used by [1 function](https://developer.wordpress.org/reference/hooks/comment_form_after_fields/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/hooks/comment_form_after_fields/#uses)
   | Source: [wp-includes/comment-template.php:2849](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/comment-template.php#L2849-L2849)
 * hook[comment_form_field_comment](https://developer.wordpress.org/reference/hooks/comment_form_field_comment/)
 * Filters the content of the comment textarea field for display.
 * Used by [1 function](https://developer.wordpress.org/reference/hooks/comment_form_field_comment/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/hooks/comment_form_field_comment/#uses)
   | Source: [wp-includes/comment-template.php:2808](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/comment-template.php#L2808-L2808)
 * hook[comment_form](https://developer.wordpress.org/reference/hooks/comment_form/)
 * Fires at the bottom of the comment form, inside the closing form tag.
 * Used by [1 function](https://developer.wordpress.org/reference/hooks/comment_form/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/hooks/comment_form/#uses)
   | Source: [wp-includes/comment-template.php:2898](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/comment-template.php#L2898-L2898)
 * hook[comment_form_after](https://developer.wordpress.org/reference/hooks/comment_form_after/)
 * Fires after the comment form.
 * Used by [1 function](https://developer.wordpress.org/reference/hooks/comment_form_after/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/hooks/comment_form_after/#uses)
   | Source: [wp-includes/comment-template.php:2912](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/comment-template.php#L2912-L2912)
 * hook[comment_form_comments_closed](https://developer.wordpress.org/reference/hooks/comment_form_comments_closed/)
 * Fires after the comment form if comments are closed.
 * Used by [1 function](https://developer.wordpress.org/reference/hooks/comment_form_comments_closed/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/hooks/comment_form_comments_closed/#uses)
   | Source: [wp-includes/comment-template.php:2508](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/comment-template.php#L2508-L2508)
 * function[wp_list_comments()](https://developer.wordpress.org/reference/functions/wp_list_comments/)
 * Displays a list of comments.
 * Used by [0 functions](https://developer.wordpress.org/reference/functions/wp_list_comments/#used-by)
   | Uses [14 functions](https://developer.wordpress.org/reference/functions/wp_list_comments/#uses)
   | Source: [wp-includes/comment-template.php:2234](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/comment-template.php#L2234-L2424)
 * function[comment_form()](https://developer.wordpress.org/reference/functions/comment_form/)
 * Outputs a complete commenting form for use within a template.
 * Used by [0 functions](https://developer.wordpress.org/reference/functions/comment_form/#used-by)
   | Uses [25 functions](https://developer.wordpress.org/reference/functions/comment_form/#uses)
   | Source: [wp-includes/comment-template.php:2495](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/comment-template.php#L2495-L2913)
 * hook[comment_form_default_fields](https://developer.wordpress.org/reference/hooks/comment_form_default_fields/)
 * Filters the default comment form fields.
 * Used by [1 function](https://developer.wordpress.org/reference/hooks/comment_form_default_fields/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/hooks/comment_form_default_fields/#uses)
   | Source: [wp-includes/comment-template.php:2606](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/comment-template.php#L2606-L2606)
 * hook[comment_form_defaults](https://developer.wordpress.org/reference/hooks/comment_form_defaults/)
 * Filters the comment form default arguments.
 * Used by [1 function](https://developer.wordpress.org/reference/hooks/comment_form_defaults/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/hooks/comment_form_defaults/#uses)
   | Source: [wp-includes/comment-template.php:2680](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/comment-template.php#L2680-L2680)
 * hook[comment_reply_link](https://developer.wordpress.org/reference/hooks/comment_reply_link/)
 * Filters the comment reply link.
 * Used by [1 function](https://developer.wordpress.org/reference/hooks/comment_reply_link/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/hooks/comment_reply_link/#uses)
   | Source: [wp-includes/comment-template.php:1873](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/comment-template.php#L1873-L1873)
 * hook[comment_form_before](https://developer.wordpress.org/reference/hooks/comment_form_before/)
 * Fires before the comment form.
 * Used by [1 function](https://developer.wordpress.org/reference/hooks/comment_form_before/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/hooks/comment_form_before/#uses)
   | Source: [wp-includes/comment-template.php:2699](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/comment-template.php#L2699-L2699)
 * function[comment_reply_link()](https://developer.wordpress.org/reference/functions/comment_reply_link/)
 * Displays the HTML content for reply to comment link.
 * Used by [2 functions](https://developer.wordpress.org/reference/functions/comment_reply_link/#used-by)
   | Uses [1 function](https://developer.wordpress.org/reference/functions/comment_reply_link/#uses)
   | Source: [wp-includes/comment-template.php:1888](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/comment-template.php#L1888-L1890)
 * hook[comment_form_must_log_in_after](https://developer.wordpress.org/reference/hooks/comment_form_must_log_in_after/)
 * Fires after the HTML-formatted ‘must log in after’ message in the comment form.
 * Used by [1 function](https://developer.wordpress.org/reference/hooks/comment_form_must_log_in_after/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/hooks/comment_form_must_log_in_after/#uses)
   | Source: [wp-includes/comment-template.php:2725](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/comment-template.php#L2725-L2725)
 * function[get_post_reply_link()](https://developer.wordpress.org/reference/functions/get_post_reply_link/)
 * Retrieves HTML content for reply to post link.
 * Used by [1 function](https://developer.wordpress.org/reference/functions/get_post_reply_link/#used-by)
   | Uses [9 functions](https://developer.wordpress.org/reference/functions/get_post_reply_link/#uses)
   | Source: [wp-includes/comment-template.php:1915](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/comment-template.php#L1915-L1966)

1 [2](https://developer.wordpress.org/reference/files/wp-includes/comment-template.php/page/2/?output_format=md)
[3](https://developer.wordpress.org/reference/files/wp-includes/comment-template.php/page/3/?output_format=md)
[4](https://developer.wordpress.org/reference/files/wp-includes/comment-template.php/page/4/?output_format=md)

 [Next Page](https://developer.wordpress.org/reference/files/wp-includes/comment-template.php/page/2/?output_format=md)