Changeset 6084

Show
Ignore:
Timestamp:
09/11/07 20:49:28 (1 year ago)
Author:
westi
Message:

Allow the wp_mail filter to change the passed data. Fixes #4511 props ryan.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/wp-includes/pluggable.php

    r6026 r6084  
    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 
     
    167170        $phpmailer = new PHPMailer(); 
    168171    } 
    169  
    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 ); 
    172172 
    173173    // Headers