Mail: Use correct capitalization for PHPMailer methods in `wp_mail()`.
Props Soean, reidbusi. Fixes #39702. Built from https://develop.svn.wordpress.org/trunk@40363 git-svn-id: http://core.svn.wordpress.org/trunk@40270 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
33dc58fe70
commit
41666b5e0c
|
@ -308,10 +308,10 @@ function wp_mail( $to, $subject, $message, $headers = '', $attachments = array()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Empty out the values that may be set
|
// Empty out the values that may be set
|
||||||
$phpmailer->ClearAllRecipients();
|
$phpmailer->clearAllRecipients();
|
||||||
$phpmailer->ClearAttachments();
|
$phpmailer->clearAttachments();
|
||||||
$phpmailer->ClearCustomHeaders();
|
$phpmailer->clearCustomHeaders();
|
||||||
$phpmailer->ClearReplyTos();
|
$phpmailer->clearReplyTos();
|
||||||
|
|
||||||
// From email and name
|
// From email and name
|
||||||
// If we don't have a name from the input headers
|
// If we don't have a name from the input headers
|
||||||
|
@ -410,7 +410,7 @@ function wp_mail( $to, $subject, $message, $headers = '', $attachments = array()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set to use PHP's mail()
|
// Set to use PHP's mail()
|
||||||
$phpmailer->IsMail();
|
$phpmailer->isMail();
|
||||||
|
|
||||||
// Set Content-Type and charset
|
// Set Content-Type and charset
|
||||||
// If we don't have a content-type from the input headers
|
// If we don't have a content-type from the input headers
|
||||||
|
@ -430,7 +430,7 @@ function wp_mail( $to, $subject, $message, $headers = '', $attachments = array()
|
||||||
|
|
||||||
// Set whether it's plaintext, depending on $content_type
|
// Set whether it's plaintext, depending on $content_type
|
||||||
if ( 'text/html' == $content_type )
|
if ( 'text/html' == $content_type )
|
||||||
$phpmailer->IsHTML( true );
|
$phpmailer->isHTML( true );
|
||||||
|
|
||||||
// If we don't have a charset from the input headers
|
// If we don't have a charset from the input headers
|
||||||
if ( !isset( $charset ) )
|
if ( !isset( $charset ) )
|
||||||
|
@ -450,17 +450,17 @@ function wp_mail( $to, $subject, $message, $headers = '', $attachments = array()
|
||||||
// Set custom headers
|
// Set custom headers
|
||||||
if ( !empty( $headers ) ) {
|
if ( !empty( $headers ) ) {
|
||||||
foreach ( (array) $headers as $name => $content ) {
|
foreach ( (array) $headers as $name => $content ) {
|
||||||
$phpmailer->AddCustomHeader( sprintf( '%1$s: %2$s', $name, $content ) );
|
$phpmailer->addCustomHeader( sprintf( '%1$s: %2$s', $name, $content ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( false !== stripos( $content_type, 'multipart' ) && ! empty($boundary) )
|
if ( false !== stripos( $content_type, 'multipart' ) && ! empty($boundary) )
|
||||||
$phpmailer->AddCustomHeader( sprintf( "Content-Type: %s;\n\t boundary=\"%s\"", $content_type, $boundary ) );
|
$phpmailer->addCustomHeader( sprintf( "Content-Type: %s;\n\t boundary=\"%s\"", $content_type, $boundary ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( !empty( $attachments ) ) {
|
if ( !empty( $attachments ) ) {
|
||||||
foreach ( $attachments as $attachment ) {
|
foreach ( $attachments as $attachment ) {
|
||||||
try {
|
try {
|
||||||
$phpmailer->AddAttachment($attachment);
|
$phpmailer->addAttachment($attachment);
|
||||||
} catch ( phpmailerException $e ) {
|
} catch ( phpmailerException $e ) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '4.8-alpha-40362';
|
$wp_version = '4.8-alpha-40363';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue