mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-07-14 04:06:36 +09:00
- fixes for email templates save process
- fixes for multilanguage email templates;
This commit is contained in:
@@ -1,9 +1,11 @@
|
||||
<?php
|
||||
namespace um\core;
|
||||
|
||||
|
||||
// Exit if accessed directly
|
||||
if ( ! defined( 'ABSPATH' ) ) exit;
|
||||
|
||||
|
||||
if ( ! class_exists( 'um\core\Mail' ) ) {
|
||||
|
||||
|
||||
@@ -392,8 +394,13 @@ if ( ! class_exists( 'um\core\Mail' ) ) {
|
||||
*/
|
||||
function send( $email, $template, $args = array() ) {
|
||||
|
||||
if ( ! is_email( $email ) ) return;
|
||||
if ( UM()->options()->get( $template . '_on' ) != 1 ) return;
|
||||
if ( ! is_email( $email ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ( UM()->options()->get( $template . '_on' ) != 1 ) {
|
||||
return;
|
||||
}
|
||||
|
||||
$this->attachments = null;
|
||||
$this->headers = 'From: '. UM()->options()->get('mail_from') .' <'. UM()->options()->get('mail_from_addr') .'>' . "\r\n";
|
||||
@@ -485,7 +492,11 @@ if ( ! class_exists( 'um\core\Mail' ) ) {
|
||||
) );
|
||||
|
||||
// Return what we found.
|
||||
return ! $template ? false : true;
|
||||
if ( get_template_directory() === get_stylesheet_directory() ) {
|
||||
return ! $template ? false : true;
|
||||
} else {
|
||||
return strstr( $template, get_stylesheet_directory() );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user