check_comment
check_comment ( $author, $email, $url, $comment, $user_ip, $user_agent, $comment_type )
Parameters:- (string) $author Comment Author's name
- (string) $email Comment Author's email
- (string) $url Comment Author's URL
- (string) $comment Comment contents
- (string) $user_ip Comment Author's IP address
- (string) $user_agent Comment Author's User Agent
- (string) $comment_type Comment type, either user submitted comment, trackback, or pingback
Uses:Returns:- (bool) Whether the checks passed (true) and the comments should be displayed or set to moderated
Defined at: - Introduced in WordPress: 1.2.0
- Deprecated in WordPress: -
Description
Checks whether a comment passes internal checks to be allowed to add.
If comment moderation is set in the administration, then all comments,
regardless of their type and whitelist will be set to false. If the number of
links exceeds the amount in the administration, then the check fails. If any
of the parameter contents match the blacklist of words, then the check fails.
If the number of links exceeds the amount in the administration, then the
check fails. If any of the parameter contents match the blacklist of words,
then the check fails.
If the comment author was approved before, then the comment is
automatically whitelisted.
If none of the checks fail, then the failback is to set the check to pass
(return true).