Make WordPress Core

Changeset 6084


Ignore:
Timestamp:
09/11/2007 08:49:28 PM (17 years ago)
Author:
westi
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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
Note: See TracChangeset for help on using the changeset viewer.