-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathfunctions.php
38 lines (31 loc) · 1.83 KB
/
functions.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
function themeConfig($form) {
$faviconUrl = new Typecho_Widget_Helper_Form_Element_Text('faviconUrl', NULL, NULL, _t('站点favicon.ico地址'), _t('站点favicon.ico地址'));
$form->addInput($faviconUrl);
$backgroundImage = new Typecho_Widget_Helper_Form_Element_Text('backgroundImage', NULL, NULL, _t('背景图片地址'), _t('请输入背景图片地址'));
$form->addInput($backgroundImage);
$backgroundText = new Typecho_Widget_Helper_Form_Element_Text('backgroundText', NULL, NULL, _t('背景图片大标题'), _t('请输入背景图片大标题内容'));
$form->addInput($backgroundText);
$footerText = new Typecho_Widget_Helper_Form_Element_Text('footerText', NULL, NULL, _t('底部自定义内容'), _t('如备案号等,将在页面最底部显示。支持html'));
$form->addInput($footerText);
$sidebarBlock = new Typecho_Widget_Helper_Form_Element_Checkbox('sidebarBlock',
array('showCategory' => _t('显示分类'),
'showTag' => _t('显示标签'),
'showArchive' => _t('显示归档'),
'showOther' => _t('显示更多')),
array('showCategory', 'showTag', 'showArchive', 'showOther'), _t('侧边栏显示'));
$form->addInput($sidebarBlock->multiMode());
$useHighline = new Typecho_Widget_Helper_Form_Element_Radio('useHighline',
array('1' => _t('启用'),
'0' => _t('禁止'),
),
'0', _t('代码高亮设置'), _t('默认禁止,启用则会对 ``` 进行代码高亮'));
$form->addInput($useHighline);
$useToc = new Typecho_Widget_Helper_Form_Element_Radio('useToc',
array('1' => _t('启用'),
'0' => _t('禁止'),
),
'0', _t('文章目录设置'), _t('默认禁止,会在文章右侧显示目录'));
$form->addInput($useToc);
}