From 52ab9c1909f39c8854e8235cddd351ef72505e91 Mon Sep 17 00:00:00 2001 From: BigCoke233 Date: Thu, 30 Jul 2020 23:49:46 +0800 Subject: =?UTF-8?q?:fire:=20Del:=20=E7=A7=BB=E9=99=A4=E6=97=A7=E7=89=88?= =?UTF-8?q?=E6=9C=AC=E6=89=80=E6=9C=89=E6=96=87=E4=BB=B6=EF=BC=8C=E5=87=86?= =?UTF-8?q?=E5=A4=87=202.0=20=E7=89=88=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- functions.php | 62 ----------------------------------------------------------- 1 file changed, 62 deletions(-) delete mode 100644 functions.php (limited to 'functions.php') diff --git a/functions.php b/functions.php deleted file mode 100644 index 3903fc3..0000000 --- a/functions.php +++ /dev/null @@ -1,62 +0,0 @@ -contentEx = array('Contents','parseContent'); -Typecho_Plugin::factory('Widget_Abstract_Contents')->excerptEx = array('Contents','parseContent'); -Typecho_Plugin::factory('admin/write-post.php')->bottom = array('Utils', 'addButton'); -Typecho_Plugin::factory('admin/write-page.php')->bottom = array('Utils', 'addButton'); - -/** - * 主题启用时执行的方法 - */ -function themeInit($archive) { - if ($archive->hidden) header('HTTP/1.1 200 OK');//暴力解决访问加密文章会被 pjax 刷新页面的问题 - //Helper::options()->commentsAntiSpam = false; 关闭反垃圾 - Helper::options()->commentsHTMLTagAllowed = ' '; - Helper::options()->commentsMaxNestingLevels = '9999';//最大嵌套层数 - Helper::options()->commentsPageDisplay = 'first';//强制评论第一页 - Helper::options()->commentsOrder = 'DESC';//将最新的评论展示在前 - Helper::options()->commentsCheckReferer = false;//关闭检查评论来源URL与文章链接是否一致判断(否则会无法评论) - //将设置储存到全局变量以便使用 - $GLOBALS['miraclesOptions_randomBanner'] = Helper::options()->randomBanner; - $GLOBALS['miraclesOptions_CDN'] = Helper::options()->CDN; - $GLOBALS['miraclesOptions_loading_image'] = Helper::options()->loading_image; -} - -/** - * 文章与独立页自定义字段 - */ -function themeFields(Typecho_Widget_Helper_Layout $layout) { - $banner = new Typecho_Widget_Helper_Form_Element_Text('banner', NULL, NULL,_t('文章头图'), _t('输入一个图片 url,作为缩略图显示在文章列表,没有则不显示')); - $layout->addItem($banner); - $excerpt = new Typecho_Widget_Helper_Form_Element_Text('excerpt', NULL, NULL,_t('文章摘要'), _t('输入一段文本来自定义摘要,如果为空则自动提取文章前 130 字。')); - $layout->addItem($excerpt); - $meta = new Typecho_Widget_Helper_Form_Element_Text('meta', NULL, NULL,_t('元信息'), _t('页面/文章内页会显示该页面的评论数和创建日期(元信息),如果你不需要,可以写一段文字来代替这些内容。')); - $layout->addItem($meta); - $commentShow = new Typecho_Widget_Helper_Form_Element_Select('commentShow',array('0'=>'显示','1'=>'隐藏'),'0','是否显示评论列表'); - $layout->addItem($commentShow); -} - -/** - * 获取主题版本号 - */ -function themeVersion() { - $info = Typecho_Plugin::parseInfo(__DIR__ . '/index.php'); - return $info['version']; -} \ No newline at end of file -- cgit v1.2.3