-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathfunctions.php
More file actions
29 lines (23 loc) · 1.3 KB
/
functions.php
File metadata and controls
29 lines (23 loc) · 1.3 KB
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
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
function themeConfig($form) {
$headImg = new Typecho_Widget_Helper_Form_Element_Text('headImg', NULL, NULL, _t('首页大图地址'), _t('在这里填入一个图片URL地址, 推荐使用:<a href="https://tat.pics/" target="_blank">TAT 塔塔图床</a>'));
$form->addInput($headImg);
$footerHtml = new Typecho_Widget_Helper_Form_Element_Textarea('footerHtml', NULL, NULL, _t('底部Footer附加内容'), _t('在这里填入Html代码,包括但不限于跟踪代码'));
$form->addInput($footerHtml);
$sidebarBlock = new Typecho_Widget_Helper_Form_Element_Checkbox('sidebarBlock',
array('ShowRecentPosts' => _t('显示最新文章'),
'ShowCategory' => _t('显示分类')),
array('ShowRecentPosts', 'ShowCategory'), _t('侧边栏显示'));
$form->addInput($sidebarBlock->multiMode());
}
function mytheme_get_avatar($avatar) {
$avatar = str_replace(array("www.gravatar.com","0.gravatar.com","1.gravatar.com","2.gravatar.com"),"gravatar.duoshuo.com",$avatar);
return $avatar;
}
/*
function themeFields($layout) {
$logoUrl = new Typecho_Widget_Helper_Form_Element_Text('logoUrl', NULL, NULL, _t('站点LOGO地址'), _t('在这里填入一个图片URL地址, 以在网站标题前加上一个LOGO'));
$layout->addItem($logoUrl);
}
*/