wp_blacklist_check
Fires before the comment is tested for blacklisted characters or words.
Description
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.
- // run the action
- do_action( 'wp_blacklist_check', $author, $email, $url, $comment, $user_ip, $user_agent );
- The following example is for adding a hook callback.
- // define the wp_blacklist_check callback
- function action_wp_blacklist_check( $author, $email, $url, $comment, $user_ip, $user_agent ) {
- // make action magic happen here...
- };
- // add the action
- add_action( 'wp_blacklist_check', 'action_wp_blacklist_check', 10, 6 );
- To remove a hook callback, use the example below.
- // remove the action
- 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
- do_action( 'wp_blacklist_check', $author, $email, $url, $comment, $user_ip, $user_agent );