[wp-trac] [WordPress Trac] #14802: 'pre_comment_approved' filter does not provide context

WordPress Trac wp-trac at lists.automattic.com
Tue Sep 7 14:30:38 UTC 2010


#14802: 'pre_comment_approved' filter does not provide context
-------------------------+--------------------------------------------------
 Reporter:  coffee2code  |       Owner:                 
     Type:  enhancement  |      Status:  new            
 Priority:  normal       |   Milestone:  Awaiting Review
Component:  Comments     |     Version:                 
 Severity:  trivial      |    Keywords:  has-patch      
-------------------------+--------------------------------------------------
 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.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/14802>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list