Opened 16 years ago
Closed 16 years ago
#5805 closed defect (bug) (invalid)
wp_blacklist_check-hook doesn't pass all the arguments it should
Reported by: | webaholic | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | General | Keywords: | |
Focuses: | Cc: |
Description
Developing an anti-spam plugin I struggled at the wp_blacklist_check - hook. Codex says there will be some arguments I should get (like email, text, etc.) but I only got the author name.
Researching why I didn't get anything more I found the following:
do_action('wp_blacklist_check', $author, $email, $url, $comment, $user_ip, $user_agent);
while do_action is limited to 2 arguments:
function do_action($tag, $arg = '') { [...] }
This should be changed into something like
do_action('wp_blacklist_check', array($author, $email, $url, $comment, $user_ip, $user_agent));
I think.
Change History (1)
Note: See
TracTickets for help on using
tickets.
You need to read more about add_action and do_action(). The calls are correct.
You have to do this instead.