From d5b4e5f4433f3963e1b7d85a79a41b83cf7dabc0 Mon Sep 17 00:00:00 2001 From: Hwa Date: Sun, 8 Aug 2021 08:52:51 +0800 Subject: [PATCH] fix: fix duplicate column, fix sending email --- functions.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/functions.php b/functions.php index 15d05ae..66acabd 100644 --- a/functions.php +++ b/functions.php @@ -1001,7 +1001,7 @@ function comment_mail_notify($comment_id) margin: 10px auto 0; " target="_blank" href="' . htmlspecialchars(get_comment_link($parent_id)) . '">点击查看回复的完整內容

本邮件为系统自动发出,请勿直接回复
- © ' . date(Y) . ' ' . get_option("blogname") . '

+ © ' . date("Y") . ' ' . get_option("blogname") . '

'; @@ -1809,7 +1809,7 @@ function markdown_parser($incoming_comment) } $myCustomer = $wpdb->get_row("SELECT * FROM wp_comments"); //Add column if not present. - if (!isset($myCustomer->comment_markdown)) { + if (!property_exists($myCustomer, "comment_markdown")) { $wpdb->query("ALTER TABLE wp_comments ADD comment_markdown text"); } $comment_markdown_content = $incoming_comment['comment_content'];