增加显示页面加载时间的开关
This commit is contained in:
parent
a88130d5c5
commit
8543bc6fe1
13
footer.php
13
footer.php
|
@ -4,13 +4,16 @@
|
|||
<div class=site--footer__sns>
|
||||
<?php $this->need('sns.php'); ?>
|
||||
</div>
|
||||
<?php if($this->options->sitemapurl): ?>
|
||||
<?php //sitemap填入
|
||||
if($this->options->sitemapurl): ?>
|
||||
<a href="<?php $this->options->sitemapurl() ?>" target="_blank">💗</a>
|
||||
<?php endif; ?>
|
||||
<a href="https://www.typecho.org">Typecho驱动</a>
|
||||
<a href="https://www.imsun.org"> Made with Sun</a>
|
||||
页面加载耗时
|
||||
<?php echo timer_stop();?>
|
||||
<a href="https://www.typecho.org" target="_blank">Typecho驱动</a>
|
||||
<a href="https://www.imsun.org" target="_blank"> Made with Sun</a>
|
||||
<?php //添加加载时间控制
|
||||
if ($this->options->showtime): ?>
|
||||
页面加载耗时<?php echo timer_stop();?>
|
||||
<?php endif; ?>
|
||||
<div class="copyright">
|
||||
<a href="<?php $this->options->siteUrl(); ?>">
|
||||
<?php $this->options->title(); ?>
|
||||
|
|
|
@ -51,6 +51,10 @@ function themeConfig($form) {
|
|||
array('0'=> _t('否'), '1'=> _t('是')),
|
||||
'0', _t('是否显示文章目录'), _t('选择“是”将在文章页面显示文章目录(仅在宽度大于1400px的设备中显示)。'));
|
||||
$form->addInput($showtoc);
|
||||
$showtime = new Typecho_Widget_Helper_Form_Element_Radio('showtime',
|
||||
array('0'=> _t('否'), '1'=> _t('是')),
|
||||
'0', _t('是否显示页面加载时间'), _t('选择“是”将在页脚显示加载时间。'));
|
||||
$form->addInput($showtime);
|
||||
}
|
||||
function get_post_view($archive) {
|
||||
$cid = $archive->cid;
|
||||
|
|
Loading…
Reference in New Issue