wp-includes/comment.php › WordPress File

Core Comment API

Function Short description
add_comment_metaAdds meta data field to a comment.
check_commentChecks whether a comment passes internal checks to be allowed to add.
check_comment_flood_dbHooks WP's native database-based comment-flood check.
clean_comment_cacheRemoves a comment from the object cache.
delete_comment_metaRemoves metadata matching criteria from a comment.
discover_pingback_server_uriFinds a pingback server URI based on the given URL.
do_all_enclosuresPerforms all enclosures.
do_all_pingbacksPerforms all pingbacks.
do_all_pingsPerforms all pingbacks, enclosures, trackbacks, and sends to pingback services.
do_all_trackbacksPerforms all trackbacks.
do_trackbacksPerforms trackbacks.
generic_pingSends pings to all of the ping site services.
get_approved_commentsRetrieves the approved comments for a post.
get_commentRetrieves comment data given a comment ID or comment object.
get_commentsRetrieves a list of comments.
get_comment_countRetrieves the total comment counts for the whole site or a single post.
get_comment_metaRetrieves comment meta field for a comment.
get_comment_pages_countCalculates the total number of comment pages.
get_comment_statusesRetrieves all of the WordPress supported comment statuses.
get_default_comment_statusGets the default comment status for a post type.
get_lastcommentmodifiedRetrieves the date the last comment was modified.
get_page_of_commentCalculates what page number a comment will appear on for comment paging.
pingbackPings back the links found in a post.
pingback_ping_source_uriDefault filter attached to pingback_ping_source_uri to validate the pingback's Source URI.
privacy_ping_filterChecks whether blog is public before returning sites.
sanitize_comment_cookiesSanitizes the cookies sent to the user already.
separate_commentsSeparates an array of comments into an array keyed by comment_type.
trackbackSends a Trackback.
update_comment_cacheUpdates the comment cache of given comments.
update_comment_metaUpdates comment meta field based on comment ID.
weblog_pingSends a pingback.
wp_allow_commentValidates whether this comment is allowed to be made.
wp_cache_set_comments_last_changedSets the last changed time for the 'comment' cache group.
wp_check_comment_data_max_lengthsCompares the lengths of comment data against the maximum character limits.
wp_check_comment_disallowed_listChecks if a comment contains disallowed characters or words.
wp_check_comment_floodChecks whether comment flooding is occurring.
wp_comments_personal_data_eraserErases personal data associated with an email address from the comments table.
wp_comments_personal_data_exporterFinds and exports personal data associated with an email address from the comments table.
wp_count_commentsRetrieves the total comment counts for the whole site or a single post.
wp_defer_comment_countingDetermines whether to defer comment counting.
wp_delete_commentTrashes or deletes a comment.
wp_filter_commentFilters and sanitizes comment data.
wp_get_comment_fields_max_lengthsRetrieves the maximum character lengths for the comment form fields.
wp_get_comment_statusRetrieves the status of a comment by comment ID.
wp_get_current_commenterGets current commenter's name, email, and URL.
wp_get_unapproved_comment_author_emailGets unapproved comment author's email.
wp_handle_comment_submissionHandles the submission of a comment, usually posted to wp-comments-post.php via a comment form.
wp_insert_commentInserts a comment into the database.
wp_lazyload_comment_metaQueue comment meta for lazy-loading.
wp_new_commentAdds a new comment to the database.
wp_new_comment_notify_moderatorSends a comment moderation notification to the comment moderator.
wp_new_comment_notify_postauthorSends a notification of a new comment to the post author.
wp_register_comment_personal_data_eraserRegisters the personal data eraser for comments.
wp_register_comment_personal_data_exporterRegisters the personal data exporter for comments.
wp_set_comment_cookiesSets the cookies used to store an unauthenticated commentator's identity. Typically used to recall previous comments by this commentator that are still held in moderation.
wp_set_comment_statusSets the status of a comment.
wp_spam_commentMarks a comment as Spam.
wp_throttle_comment_floodDetermines whether a comment should be blocked because of comment flood.
wp_transition_comment_statusCalls hooks for when a comment status transition occurs.
wp_trash_commentMoves a comment to the Trash
wp_unspam_commentRemoves a comment from the Spam.
wp_untrash_commentRemoves a comment from the Trash
wp_update_commentUpdates an existing comment in the database.
wp_update_comment_countUpdates the comment count for post(s).
wp_update_comment_count_nowUpdates the comment count for the post.
xmlrpc_pingback_errorDefault filter attached to xmlrpc_pingback_error.
_clear_modified_cache_on_transition_comment_statusClears the lastcommentmodified cached value when a comment status is changed.
_close_comments_for_old_postCloses comments on an old post. Hooked to comments_open and pings_open.
_close_comments_for_old_postsCloses comments on old posts on the fly, without any extra DB queries. Hooked to the_posts.
_prime_comment_cachesAdds any comments from the given IDs to the cache that do not already exist in cache.
_wp_batch_update_comment_typeUpdates the comment type for a batch of comments.