Merge branch 'master' of https://github.com/ultimatemember/ultimatemember into fix/ms_email_templates

This commit is contained in:
nikitozzzzzzz
2018-05-30 15:15:57 +03:00
22 changed files with 231 additions and 80 deletions
+6 -18
View File
@@ -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
*