[wp-trac] [WordPress Trac] #19860: pre_comment_approved filter has second argument undefined

WordPress Trac wp-trac at lists.automattic.com
Fri Jan 20 10:29:22 UTC 2012


#19860: pre_comment_approved filter has second argument undefined
--------------------------+----------------------
 Reporter:  laotse        |       Owner:
     Type:  defect (bug)  |      Status:  closed
 Priority:  normal        |   Milestone:
Component:  General       |     Version:
 Severity:  normal        |  Resolution:  invalid
 Keywords:                |
--------------------------+----------------------
Changes (by dd32):

 * status:  new => closed
 * resolution:   => invalid
 * milestone:  Awaiting Review =>


Comment:

 You must specifically add the filter asking for 2 arguements to be
 passed.:

 `add_filter($action, $function, $priority=10, $number_of_args=1);`

 So you want:

 `add_filter('pre_comment_approved', 'tgb_comment_filter_approved', 10,
 2);`

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/19860#comment:1>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list