From 017458d863bafaa529e6b788479b4a63ce32dcd4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=9C=E6=81=92?= <2323333339@qq.com>
Date: Thu, 20 May 2021 10:39:28 +0800
Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
core/function.php | 2 +-
functions.php | 15 +++++++++++++++
package.json | 2 +-
public/comment.php | 10 ++++++----
4 files changed, 23 insertions(+), 6 deletions(-)
diff --git a/core/function.php b/core/function.php
index 0cb7d09..e6826cd 100644
--- a/core/function.php
+++ b/core/function.php
@@ -2,7 +2,7 @@
/* 获取主题当前版本号 */
function _getVersion()
{
- return "6.9.9";
+ return "7.0.0";
};
/* 判断是否是手机 */
diff --git a/functions.php b/functions.php
index f649e13..8236fcc 100644
--- a/functions.php
+++ b/functions.php
@@ -62,6 +62,21 @@ function themeConfig($form)
$JLogo->setAttribute('class', 'joe_content joe_image');
$form->addInput($JLogo);
+ $JCommentStatus = new Typecho_Widget_Helper_Form_Element_Select(
+ 'JCommentStatus',
+ array(
+ 'on' => '开启(默认)',
+ 'off' => '关闭'
+ ),
+ '3',
+ '开启或关闭全站评论',
+ '介绍:用于一键开启关闭所有页面的评论
+ 注意:此处的权重优先级最高
+ 若关闭此项而文章内开启评论,评论依旧为关闭状态'
+ );
+ $JCommentStatus->setAttribute('class', 'joe_content joe_global');
+ $form->addInput($JCommentStatus->multiMode());
+
$JNavMaxNum = new Typecho_Widget_Helper_Form_Element_Select(
'JNavMaxNum',
array(
diff --git a/package.json b/package.json
index 49c026c..cf0db0f 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "typecho-joe-next",
- "version": "6.9.9",
+ "version": "7.0.0",
"description": "A Theme Of Typecho",
"main": "index.php",
"keywords": [
diff --git a/public/comment.php b/public/comment.php
index 407c32c..893ae1c 100644
--- a/public/comment.php
+++ b/public/comment.php
@@ -11,7 +11,7 @@
当前文章受密码保护,无法评论
- allow('comment')) : ?>
+ allow('comment') && $this->options->JCommentStatus !== "off") : ?>