Title: wp_blacklist_check
Published: April 25, 2014
Last modified: April 28, 2025

---

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

## In this article

 * [Parameters](https://developer.wordpress.org/reference/functions/wp_blacklist_check/?output_format=md#parameters)
 * [Return](https://developer.wordpress.org/reference/functions/wp_blacklist_check/?output_format=md#return)
 * [Source](https://developer.wordpress.org/reference/functions/wp_blacklist_check/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/functions/wp_blacklist_check/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/functions/wp_blacklist_check/?output_format=md#changelog)

[ Back to top](https://developer.wordpress.org/reference/functions/wp_blacklist_check/?output_format=md#wp--skip-link--target)

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

Does comment contain disallowed characters or words.

## 󠀁[Parameters](https://developer.wordpress.org/reference/functions/wp_blacklist_check/?output_format=md#parameters)󠁿

 `$author`stringrequired

The author of the comment

`$email`stringrequired

The email of the comment

`$url`stringrequired

The url used in the comment

`$comment`stringrequired

The comment content

`$user_ip`stringrequired

The comment author’s IP address

`$user_agent`stringrequired

The author’s browser user agent

## 󠀁[Return](https://developer.wordpress.org/reference/functions/wp_blacklist_check/?output_format=md#return)󠁿

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

## 󠀁[Source](https://developer.wordpress.org/reference/functions/wp_blacklist_check/?output_format=md#source)󠁿

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

[View all references](https://developer.wordpress.org/reference/files/wp-includes/deprecated.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/6.9.4/src/wp-includes/deprecated.php#L4046)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-includes/deprecated.php#L4046-L4050)

## 󠀁[Related](https://developer.wordpress.org/reference/functions/wp_blacklist_check/?output_format=md#related)󠁿

| Uses | Description | 
| [wp_check_comment_disallowed_list()](https://developer.wordpress.org/reference/functions/wp_check_comment_disallowed_list/)`wp-includes/comment.php` |

Checks if a comment contains disallowed characters or words.

  | 
| [_deprecated_function()](https://developer.wordpress.org/reference/functions/_deprecated_function/)`wp-includes/functions.php` |

Marks a function as deprecated and inform when it has been used.

  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/functions/wp_blacklist_check/?output_format=md#changelog)󠁿

| Version | Description | 
| [5.5.0](https://developer.wordpress.org/reference/since/5.5.0/) | Deprecated. Use [wp_check_comment_disallowed_list()](https://developer.wordpress.org/reference/functions/wp_check_comment_disallowed_list/) instead.
 Please consider writing more inclusive code. | 
| [1.5.0](https://developer.wordpress.org/reference/since/1.5.0/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Fwp_blacklist_check%2F)
before being able to contribute a note or feedback.