#14802 closed enhancement (fixed)
'pre_comment_approved' filter does not provide context
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | 3.1 | Priority: | normal |
Severity: | trivial | Version: | |
Component: | Comments | Keywords: | has-patch |
Focuses: | Cc: |
Description
The 'pre_comment_approved' filter does not pass along any context to functions utilizing the hook. In particular, nothing about the comment in question is passed along. The only argument passed is the value indicating if the comment is approved/rejected/spam. Without knowing anything about the comment, the hook is of a more limited use than it could be (or at least requires more work to get at the info).
Therefore, when applying the 'pre_comment_approved' filter, ( in wp-includes/comment.php, function wp_allow_comment() ) the $commentdata
sent to wp_allow_comment()
should be passed along. See attachment diff.
Attachments (1)
Change History (3)
Note: See
TracTickets for help on using
tickets.
Patch mentioned in ticket.