[wp-trac] [WordPress Trac] #10185: wp_mail filter does not return filtered strings

WordPress Trac wp-trac at lists.automattic.com
Tue Jun 16 11:16:37 GMT 2009


#10185: wp_mail filter  does not return filtered strings
--------------------------+-------------------------------------------------
 Reporter:  anmari        |       Owner:                           
     Type:  defect (bug)  |      Status:  new                      
 Priority:  normal        |   Milestone:  Unassigned               
Component:  General       |     Version:                           
 Severity:  normal        |    Keywords:  wp_mail, filters, extract
--------------------------+-------------------------------------------------
 Firstly, if calling function wp_mail directly, one gets this message:

 Warning: extract() [function.extract]: First argument should be an array
 in pluggable.php line 256

 The code is:
 extract( apply_filters( 'wp_mail', compact( 'to', 'subject', 'message',
 'headers', 'attachments' ) ) );

 apply filters returns a string with "array" ?, so this code does not
 appear to work.

 Further down the filters are applied again individually for 'wp_mail_from'
 and 'wp_mail_from_name'
 why not apply the wp_mail filters on the subject and body lines there
 rather?

 If I do this, it seems to work.

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


More information about the wp-trac mailing list