fix(email): complete mail settings and templates
This commit is contained in:
1 parent
4f8ab94fac
commit
4833053a5c
29 files changed
+716
-426
No files matched your search
@@ -365,16 +365,7 @@ trait FacadeBulk {
|
||||
|
||||
/** 获取SMTP配置 */
|
||||
public static function get_smtp(): array {
|
||||
return get_option('aksrt_mail_smtp', [
|
||||
'enabled' => false,
|
||||
'host' => '',
|
||||
'port' => 465,
|
||||
'username' => '',
|
||||
'password' => '',
|
||||
'encryption' => 'ssl',
|
||||
'from_name' => '',
|
||||
'from_address' => '',
|
||||
]);
|
||||
return Mail::get_smtp();
|
||||
}
|
||||
|
||||
|
||||
@@ -382,11 +373,12 @@ trait FacadeBulk {
|
||||
/** 获取邮件品牌设置(发件人昵称/标题前缀/底部内容) */
|
||||
public static function get_mail_branding(): array {
|
||||
$s = self::get_all();
|
||||
$site = (string) get_bloginfo('name');
|
||||
return [
|
||||
'showname' => trim((string) ($s['mail_showname'] ?? '')),
|
||||
'title_prefix' => trim((string) ($s['mail_title_prefix'] ?? '')),
|
||||
'showname' => trim((string) ($s['mail_showname'] ?? $site)) ?: $site,
|
||||
'title_prefix' => trim((string) ($s['mail_title_prefix'] ?? '[' . $site . ']')) ?: '[' . $site . ']',
|
||||
'description' => trim((string) ($s['mail_description'] ?? '')),
|
||||
'more_content' => trim((string) ($s['mail_more_content'] ?? '')),
|
||||
'more_content' => wp_kses_post((string) ($s['mail_more_content'] ?? '')),
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user