WordPress.org

Make WordPress Core

Ticket #4511: wp_mail_extr_skip.diff

File wp_mail_extr_skip.diff, 845 bytes (added by ryan, 10 years ago)
  • wp-includes/pluggable.php

     
    158158 
    159159if ( !function_exists( 'wp_mail' ) ) : 
    160160function wp_mail( $to, $subject, $message, $headers = '' ) { 
     161        // Compact the input, apply the filters, and extract them back out 
     162        extract( apply_filters( 'wp_mail', compact( 'to', 'subject', 'message', 'headers' ) ) ); 
     163 
    161164        global $phpmailer; 
    162165 
    163166        // (Re)create it, if it's gone missing 
     
    167170                $phpmailer = new PHPMailer(); 
    168171        } 
    169172 
    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 ); 
    172  
    173173        // Default headers 
    174174        if ( empty( $headers ) ) { 
    175175                $headers = array(