Comments (category)

cancel_comment_reply_link()

Outputs a link for the comment form: "cancel reply".

comment_author_email_link()

Outputs the email address of the commenter as a mailto link.

comment_form()

Displays the ready code for the comment form.

comment_form_title()

Outputs the text for the comment form title, considering whether the commentator is replying to another comment or simply commenting on the post.

comment_id_fields()

Generates 2 hidden fields for the comment form: comment_post_ID and comment_parent. These fields are needed for the correct operation of the comment form.

comment_text()

Outputs the comment text on the screen.

comment_type()

Displays the name of the comment type. The names can be arbitrary.

comments_link()

Outputs the link (URL) to the comment form for the current post.

comments_popup_link()

Outputs a ready <a> link to the comment popup, works when using the script comments_popup_script().

get_avatar()

Retrieve the <img> tag with the avatar of a user who is authorized or provided an email address when commenting. Most commonly used in the comments section.

get_avatar_data()

Gets an array of data about the avatar, by the provided email, ID, user object, post object, or comment object.

get_avatar_url()

Gets the avatar URL based on the provided email, ID, or user object. You can also pass a post or comment object.

get_cancel_comment_reply_link()

Gets the "cancel reply" link for the comment form.

get_comment()

Gets the data of the specified comment from the database. Returns an instance of the WP_Comment class (it can be conditionally said that all fields of the wp_comments table are returned).

get_comment_author_email()

Gets the email of the author of the current comment in the loop. You can specify the comment ID for which you want to get the author's email.

get_comment_pages_count()

Counts the number of comment pages for a post (how many pages comments are split into).

get_comment_reply_link()

Gets the link <a> that allows replying to a comment. Used in the comment loop.

get_comment_text()

Get the text of the specified or current comment in the loop.

get_comment_type()

Gets the type of the specified or current comment in the loop.

get_comments()

Gets comments based on specified parameters, in the form of an array of data.

get_comments_link()

Gets the link (URL) to all comments for the current post.

get_comments_number()

Gets the number of all comments on a post, including notifications and pings.

get_comments_pagenum_link()

Gets the link to the specified comment pagination page of the post.

get_edit_comment_link()

Gets the URL to the edit page of the specified comment.

get_next_comments_link()

Gets a link (A tag) to the next comments page. Should be used on the post page.

get_page_of_comment()

Gets the pagination page of comments on the front-end where the specified comment should be displayed.

get_previous_comments_link()

Gets the link (A tag) to the previous comments page. Should be used on the post page.

get_the_comments_navigation()

Gets links to the previous/next comment pages, if such links exist. Used on post pages in the comments block.

get_the_comments_pagination()

Gets the pagination links for comments: a list of links to the next and previous pages of comments for the post.

is_comment_feed()

Checks if the request is a comment feed page. Conditional tag.

is_trackback()

Checks if the current request is a trackback page request.

next_comments_link()

Outputs a link (A tag) to the next page of comments.

paginate_comments_links()

Outputs a list of links to the comment pages (pagination links) of the current post.

previous_comments_link()

Displays a link to the previous comments page.

sanitize_comment_cookies()

Clears the comment form fields name, email, and website that are in cookies.

the_comments_navigation()

Outputs a navigation block for previous/next comments of a post, if they exist.

the_comments_pagination()

Outputs a block of pagination links for the comments pages of a post.

wp_allow_comment()

Checks whether the comment can be published based on the provided comment data or if it needs to be sent for review or marked as spam.

wp_count_comments()

Gets data about the number of comments on the site or separately for the specified post. Data is collected separately by comment types (all variants of the field comment_approved: approved, spam, etc.).

wp_delete_comment()

Deletes or trashes a comment by the specified ID.

wp_get_current_commenter()

Get current commenter's name, email, URL from cookies. Used for comments form.

wp_handle_comment_submission()

Processes the submission of a comment. It is called in the file wp-comments-post.php when a comment is submitted through the comment form.

wp_insert_comment()

Inserts/adds a comment into the database.

wp_list_comments()

Outputs comments of posts (posts, pages). The function can accept a number of parameters and is used in the template to display a list of comments for a post/page. Some parameters can be configured in the admin panel.

wp_new_comment()

Adds a new comment to the Database. Filters the data.

wp_notify_moderator()

Notifies the administrator and the author of the post by email about the addition of a new comment or ping that is awaiting approval.

wp_notify_postauthor()

Responsible for the email notification to the post author that a comment/ping (comment/trackback/pingback) has been left on their post. Sends an email notification.

wp_set_comment_cookies()

Sets the cookies (name, email, url) that are used to identify an unauthenticated user when commenting.

wp_set_comment_status()

Sets the comment status: hold, approve, spam.

wp_spam_comment()

Moves the specified comment to Spam (marks the comment as spam).

wp_transition_comment_status()

Calls special hooks when the status of a comment changes from one to another: for example, from unapproved to approved.

wp_update_comment()

Updates an existing comment in the Database.

wp_update_comment_count()

Updates the number of comments for the specified post.