wp_blacklist_check

函数
wp_blacklist_check ( $author, $email, $url, $comment, $user_ip, $user_agent )
参数
  • (string) $author The author of the comment
    Required:
  • (string) $email The email of the comment
    Required:
  • (string) $url The url used in the comment
    Required:
  • (string) $comment The comment content
    Required:
  • (string) $user_ip The comment author's IP address
    Required:
  • (string) $user_agent The author's browser user agent
    Required:
返回值
  • (bool) True if comment contains disallowed content, false if comment does not
定义位置
相关方法
wp_auth_checkwp_kses_attr_checkwp_list_pluckwp_playlist_shortcodewp_auth_check_html
引入
1.5.0
弃用
5.5.0

wp_blacklist_check: 这个函数用来检查一个评论是否包含黑名单上的词。

评论是否包含不允许的字符或词语。

function wp_blacklist_check( $author, $email, $url, $comment, $user_ip, $user_agent ) {
	_deprecated_function( __FUNCTION__, '5.5.0', 'wp_check_comment_disallowed_list()' );

	return wp_check_comment_disallowed_list( $author, $email, $url, $comment, $user_ip, $user_agent );
}

常见问题

FAQs
查看更多 >