WordPress.org

Make WordPress Core

Ticket #4511: wp_mail_2.diff

File wp_mail_2.diff, 662 bytes (added by takayukister, 10 years ago)

or, how about this?

  • wp-includes/pluggable.php

     
    167167                $phpmailer = new PHPMailer(); 
    168168        } 
    169169 
    170         // Compact the input, apply the filters, and extract them back out 
    171         extract( apply_filters( 'wp_mail', compact( 'to', 'subject', 'message', 'headers' ) ), EXTR_SKIP ); 
     170        apply_filters( 'wp_mail_to', $to ); 
     171        apply_filters( 'wp_mail_subject', $subject ); 
     172        apply_filters( 'wp_mail_message', $message ); 
     173        apply_filters( 'wp_mail_headers', $headers ); 
    172174 
    173175        // Default headers 
    174176        if ( empty( $headers ) ) {