return: int|array $comments The approved comments, or number of comments if `$count`param: int $post_id The ID of the post.param: array $args Optional. See WP_Comment_Query::__construct() for information on accepted arguments.

You can match based on the key, or key and value. Removing based on key and
value, will keep from removing duplicate metadata with the same key. It also
allows removing all metadata matching key, if needed.

return: mixed Will be an array if $single is false. Will be value of meta data field if $singleparam: int $comment_id Comment ID.param: string $key Optional. The meta key to retrieve. By default, returns data for all keys.param: bool $single Whether to return a single value.

return: int|string|WP_Error Allowed comments return the approval status (0|1|'spam').param: array $commentdata Contains information on the comment.param: bool $avoid_die When true, a disallowed comment will result in the function

The properties of the returned object contain the 'moderated', 'approved',
and spam comments for either the entire blog or single post. Those properties
contain the amount of comments that match the status. The 'total_comments'
property contains the integer of total comments.

The comment stats are cached and then retrieved, if they already exist in the
cache.

Calls hooks for comment status transitions. If the new comment status is not the same
as the previous comment status, then two hooks will be ran, the first is
{@see 'transition_comment_status'} with new status, old status, and comment data. The
next action called is {@see comment_$old_status_to_$new_status'}. It has the
comment data.

The final action will run whether or not the comment statuses are the same. The
action is named {@see 'comment_$new_status_$comment->comment_type'}.

Filters new comment to ensure that the fields are sanitized and valid before
inserting comment into database. Calls {@see 'comment_post'} action with comment ID
and whether comment is approved by WordPress. Also has {@see 'preprocess_comment'}
filter for processing the comment data before the function handles it.

We use `REMOTE_ADDR` here directly. If you are behind a proxy, you should ensure
that it is properly set, such as in wp-config.php, for your environment.

See {@link https://core.trac.wordpress.org/ticket/9235}

return: int|false|WP_Error The ID of the comment on success, false or WP_Error on failure.param: array $commentdata {param: bool $avoid_die Should errors be returned as WP_Error objects instead of

When setting $defer to true, all post comment counts will not be updated
until $defer is set to false. When $defer is set to false, then all
previously deferred updated post comment counts will then be automatically
updated without having to call wp_update_comment_count() after.

Checks the HTML for the rel="pingback" link and x-pingback headers. It does
a check for the x-pingback headers first and returns that, if available. The
check for the rel="pingback" has more overhead than just the header.

Will add the comments in $comments to the cache. If comment ID already exists
in the comment cache then it will not be updated. The comment is added to the
cache using the comment group with the key using the ID of the comments.