wp_blacklist_check

Fires before the comment is tested for blacklisted characters or words.

Description

do_action( 'wp_blacklist_check', (string) $author, (string) $email, (string) $url, (string) $comment, (string) $user_ip, (string) $user_agent ); 

Parameters (6)

0. $author (string)
Comment author.
1. $email (string)
Comment author's email.
2. $url (string)
Comment author's URL.
3. $comment (string)
Comment content.
4. $user_ip (string)
Comment author's IP address.
5. $user_agent (string)
Comment author's browser user agent.

Usage

To run the hook, copy the example below.
  1. // run the action 
  2. do_action( 'wp_blacklist_check', $author, $email, $url, $comment, $user_ip, $user_agent ); 
The following example is for adding a hook callback.
  1. // define the wp_blacklist_check callback 
  2. function action_wp_blacklist_check( $author, $email, $url, $comment, $user_ip, $user_agent ) { 
  3. // make action magic happen here... 
  4. }; 
  5.  
  6. // add the action 
  7. add_action( 'wp_blacklist_check', 'action_wp_blacklist_check', 10, 6 ); 
To remove a hook callback, use the example below.
  1. // remove the action 
  2. remove_action( 'wp_blacklist_check', 'action_wp_blacklist_check', 10, 6 ); 

Defined (1)

The action is defined in the following location(s).

/wp-includes/comment.php  
  1. do_action( 'wp_blacklist_check', $author, $email, $url, $comment, $user_ip, $user_agent );