From 66ce91f31fa1a0ea0c29b6fec8f78b88c531e6cd Mon Sep 17 00:00:00 2001 From: Peter Westwood Date: Thu, 22 Jan 2009 22:31:27 +0000 Subject: [PATCH] Add a filter to allow post-by-email plugins better control over the content. git-svn-id: https://develop.svn.wordpress.org/trunk@10412 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-mail.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/wp-mail.php b/wp-mail.php index 2966dc3642..a8bcc59bfa 100644 --- a/wp-mail.php +++ b/wp-mail.php @@ -142,8 +142,8 @@ for ( $i = 1; $i <= $count; $i++ ) { $post_status = 'pending'; } - $subject = trim($subject); - + $subject = trim($subject); + if ( $content_type == 'multipart/alternative' ) { $content = explode('--'.$boundary, $content); $content = $content[2]; @@ -156,6 +156,10 @@ for ( $i = 1; $i <= $count; $i++ ) { } $content = trim($content); + //Give Post-By-Email extending plugins full access to the content + //Either the raw content or the content of the last quoted-printable section + $content = apply_filters('wp_mail_original_content', $content); + if ( false !== stripos($content_transfer_encoding, "quoted-printable") ) { $content = quoted_printable_decode($content); }