From 4c9b13dd4754aa3758439c6831f41448774df95e Mon Sep 17 00:00:00 2001 From: Eltrac Koalar Date: Sun, 28 Aug 2022 00:53:12 +0800 Subject: =?UTF-8?q?:newspaper:=20Add:=20=E7=94=A8=20tocbot=20=E5=AE=9E?= =?UTF-8?q?=E7=8E=B0=E6=96=87=E7=AB=A0=E7=9B=AE=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- functions.php | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'functions.php') diff --git a/functions.php b/functions.php index 72ae387..4dcc217 100644 --- a/functions.php +++ b/functions.php @@ -20,4 +20,15 @@ function themeInit($archive) { Helper::options()->commentsPageDisplay = 'first';//强制评论第一页 Helper::options()->commentsOrder = 'DESC';//将最新的评论展示在前 Helper::options()->commentsCheckReferer = false;//关闭检查评论来源URL与文章链接是否一致判断(否则会无法评论) +} + +function themeFields($layout) +{ + $showTOC = new Typecho_Widget_Helper_Form_Element_Radio('showTOC', array( + true => _t('开启'), + false => _t('关闭')), + false, + _t('是否开启文章目录'), + _t('解析文章目录展示在文章页面左侧,代替侧边栏的位置')); + $layout->addItem($showTOC); } \ No newline at end of file -- cgit v1.2.3