Warning: This function has been deprecated. Use wp_check_comment_disallowed_list() instead. Please consider writing more inclusive code.

wp_blacklist_check() WordPress Function

The wp_blacklist_check() function is a utility function that checks whether a given IP address or hostname is blacklisted.

wp_blacklist_check( string $author, string $email, string $url, string $comment, string $user_ip, string $user_agent ) #

Does comment contain disallowed characters or words.


Parameters

$author

(string)(Required)The author of the comment

$email

(string)(Required)The email of the comment

$url

(string)(Required)The url used in the comment

$comment

(string)(Required)The comment content

$user_ip

(string)(Required)The comment author's IP address

$user_agent

(string)(Required)The author's browser user agent


Top ↑

Return

(bool) True if comment contains disallowed content, false if comment does not


Top ↑

Source

File: wp-includes/deprecated.php

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 );
}


Top ↑

Changelog

Changelog
VersionDescription
5.5.0Use wp_check_comment_disallowed_list() instead. Please consider writing more inclusive code.
1.5.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More