首页 WordPress函数大全 check_comment()

check_comment()

2020-05-01 / 3937阅 / 悠然

如何你看完本文还不知道如何使用该函数,可以联系我定制视频教程,50元/个函数,学不会全额退款

check_comment( string $author, string $email, string $url, string $comment, string $user_ip, string $user_agent, string $comment_type )

Check whether a comment passes internal checks to be allowed to add.

描述

If manual comment moderation is set in the administration, then all checks, regardless of their type and whitelist, will fail and the function will return 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 comment author was approved before, then the comment is automatically whitelisted.

If all checks pass, the function will return true.

参数

$author

(string)
(Required)
Comment author name.

$email

(string)
(Required)
Comment author email.

$url

(string)
(Required)
Comment author URL.

$comment

(string)
(Required)
Content of the comment.

$user_ip

(string)
(Required)
Comment author IP address.

$user_agent

(string)
(Required)
Comment author User-Agent.

$comment_type

(string)
(Required)
Comment type, either user-submitted comment, trackback, or pingback.

返回

(bool) If all checks pass, true, otherwise false.

大家谈论
    我的见解