Core Function
View Source on Trac ↗ check_comment()
check_comment(
mixed $author,
mixed $email,
mixed $url,
mixed $comment,
mixed $user_ip,
mixed $user_agent,
mixed $comment_type
) Checks whether a comment passes internal checks to be allowed to add.
Parameters 7 required
| Name / Type | Description |
|---|---|
| $author string | Comment author name. Required |
| $email string | Comment author email. Required |
| $url string | Comment author URL. Required |
| $comment string | Content of the comment. Required |
| $user_ip string | Comment author IP address. Required |
| $user_agent string | Comment author User-Agent. Required |
| string | $comment_type Comment type, either user-submitted comment, trackback, or pingback. Required |
Return Value
(bool)
If all checks pass, true, otherwise false.
Function Information
Since Version
1.2.0
Source File
wp-includes/comment.php
Advertisement