mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-07-17 13:43:38 +09:00
Merge branch 'master' of https://github.com/ultimatemember/ultimatemember into fix/ms_email_templates
This commit is contained in:
@@ -124,10 +124,14 @@ if ( ! class_exists( 'um\core\Mail' ) ) {
|
||||
|
||||
$this->message = $this->prepare_template( $template, $args );
|
||||
|
||||
add_filter( 'wp_mail_content_type', array( &$this, 'set_content_type' ) );
|
||||
if ( UM()->options()->get( 'email_html' ) ) {
|
||||
$this->headers .= "Content-Type: text/html\r\n";
|
||||
} else {
|
||||
$this->headers .= "Content-Type: text/plain\r\n";
|
||||
}
|
||||
|
||||
// Send mail
|
||||
wp_mail( $email, $this->subject, $this->message, $this->headers, $this->attachments );
|
||||
remove_filter( 'wp_mail_content_type', array( &$this, 'set_content_type' ) );
|
||||
}
|
||||
|
||||
|
||||
@@ -481,22 +485,6 @@ if ( ! class_exists( 'um\core\Mail' ) ) {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Set email content type
|
||||
*
|
||||
*
|
||||
* @param $content_type
|
||||
* @return string
|
||||
*/
|
||||
function set_content_type( $content_type ) {
|
||||
if ( UM()->options()->get( 'email_html' ) ) {
|
||||
return 'text/html';
|
||||
} else {
|
||||
return 'text/plain';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Ajax copy template to the theme
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user