From 9216f36964a08a031ef8b28867e9b3f0e0058ec7 Mon Sep 17 00:00:00 2001 From: Eltrac Koalar Date: Tue, 23 Aug 2022 21:45:59 +0800 Subject: =?UTF-8?q?:computer:=20Add:=20=E4=B8=BB=E9=A2=98=E5=88=9D?= =?UTF-8?q?=E5=A7=8B=E5=8C=96=EF=BC=8C=E9=81=BF=E5=85=8D=E6=97=A0=E6=B3=95?= =?UTF-8?q?=E8=AF=84=E8=AE=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- functions.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'functions.php') diff --git a/functions.php b/functions.php index 746d813..645cb41 100644 --- a/functions.php +++ b/functions.php @@ -11,4 +11,13 @@ require_once('libs/Options.php'); require_once('libs/Comments.php'); Typecho_Plugin::factory('Widget_Abstract_Contents')->contentEx = array('Matcha','parseContent'); -Typecho_Plugin::factory('Widget_Abstract_Contents')->excerptEx = array('Matcha','parseContent'); \ No newline at end of file +Typecho_Plugin::factory('Widget_Abstract_Contents')->excerptEx = array('Matcha','parseContent'); + +function themeInit($archive) { + if ($archive->hidden) header('HTTP/1.1 200 OK');//暴力解决访问加密文章会被 pjax 刷新页面的问题 + Helper::options()->commentsAntiSpam = false; 关闭反垃圾 + Helper::options()->commentsMaxNestingLevels = '9999';//最大嵌套层数 + Helper::options()->commentsPageDisplay = 'first';//强制评论第一页 + Helper::options()->commentsOrder = 'DESC';//将最新的评论展示在前 + Helper::options()->commentsCheckReferer = false;//关闭检查评论来源URL与文章链接是否一致判断(否则会无法评论) +} \ No newline at end of file -- cgit v1.2.3