mirror of
https://github.com/mashirozx/sakura.git
synced 2024-12-12 09:54:35 +08:00
PHP 7.2 supported
Fixed according to http://php.net/manual/zh/migration72.deprecated.php
This commit is contained in:
parent
aaf79daa29
commit
a3b66fd9b5
@ -468,7 +468,7 @@ function get_post_views($post_id) {
|
||||
* return restyle_text($views);
|
||||
* }
|
||||
*/
|
||||
return wp_statistics_pages(total,uri,$post_id);
|
||||
return wp_statistics_pages('total','uri',$post_id);
|
||||
}
|
||||
|
||||
|
||||
@ -1230,7 +1230,7 @@ function memory_archives_list() {
|
||||
$mon = $mon_tmp;
|
||||
$output .= '<li class="al_li"><span class="al_mon">'.$mon.'月 (<span id="post-num"></span>篇文章)</span><ul class="al_post_list">'; //输出月份
|
||||
}
|
||||
$output .= '<li>'.'<a href="'. get_permalink() .'"><span style="color:#0bf;">'.get_the_time('d日 ') .'</span>'. get_the_title() .' <span>('.wp_statistics_pages(total,get_permalink(),get_the_ID()).' <span class="fa fa-fire" aria-hidden="true"></span> / '. get_comments_number('0', '1', '%') .' <span class="fa fa-commenting" aria-hidden="true"></span>)</span></a></li>'; //输出文章日期和标题
|
||||
$output .= '<li>'.'<a href="'. get_permalink() .'"><span style="color:#0bf;">'.get_the_time('d日 ') .'</span>'. get_the_title() .' <span>('.wp_statistics_pages('total',get_permalink(),get_the_ID()).' <span class="fa fa-fire" aria-hidden="true"></span> / '. get_comments_number('0', '1', '%') .' <span class="fa fa-commenting" aria-hidden="true"></span>)</span></a></li>'; //输出文章日期和标题
|
||||
endwhile;
|
||||
wp_reset_postdata();
|
||||
$output .= '</ul></li></ul> <!--<ul class="al_mon_list"><li><ul class="al_post_list" style="display: block;"><li>博客已经萌萌哒运行了<span id="monitorday"></span>天</li></ul></li></ul>--></div>';
|
||||
|
@ -35,7 +35,7 @@
|
||||
<span><i class="iconfont icon-mark"></i><?php comments_popup_link('NOTHING', '1 条评论', '% 条评论'); ?></span>
|
||||
</div>
|
||||
<div class="views">
|
||||
<span><i class="iconfont icon-attention"></i><?php echo wp_statistics_pages(total,uri,get_the_ID()); ?> 热度</span>
|
||||
<span><i class="iconfont icon-attention"></i><?php echo wp_statistics_pages('total','uri',get_the_ID()); ?> 热度</span>
|
||||
</div>
|
||||
</div>
|
||||
</footer><!-- .entry-footer -->
|
||||
|
@ -13,7 +13,7 @@
|
||||
<?php if(akina_option('patternimg') || !get_post_thumbnail_id(get_the_ID())) { ?>
|
||||
<header class="entry-header">
|
||||
<h1 class="entry-title"><?php the_title(); ?></h1>
|
||||
<p class="entry-census"><?php echo poi_time_since(strtotime($post->post_date)); ?> <?php echo wp_statistics_pages(total,uri,get_the_ID()); ?> 次阅读</p>
|
||||
<p class="entry-census"><?php echo poi_time_since(strtotime($post->post_date)); ?> <?php echo wp_statistics_pages('total','uri',get_the_ID()); ?> 次阅读</p>
|
||||
<hr>
|
||||
</header><!-- .entry-header -->
|
||||
<?php } ?>
|
||||
|
@ -31,7 +31,7 @@
|
||||
<span><i class="iconfont icon-mark"></i><?php comments_popup_link('NOTHING', '1 条评论', '% 条评论'); ?></span>
|
||||
</div>
|
||||
<div class="views">
|
||||
<span><i class="iconfont icon-attention"></i><?php echo wp_statistics_pages(total,uri,get_the_ID()); ?> 热度</span>
|
||||
<span><i class="iconfont icon-attention"></i><?php echo wp_statistics_pages('total','uri',get_the_ID()); ?> 热度</span>
|
||||
</div>
|
||||
</div>
|
||||
</footer><!-- .entry-footer -->
|
||||
|
@ -37,7 +37,7 @@ $the_cat = get_the_category();
|
||||
</div>
|
||||
<a href="<?php the_permalink(); ?>" class="post-title"><h3><?php the_title();?></h3></a>
|
||||
<div class="post-meta">
|
||||
<span><i class="iconfont icon-attention"></i><?php echo wp_statistics_pages(total,uri,get_the_ID()); ?> 热度</span>
|
||||
<span><i class="iconfont icon-attention"></i><?php echo wp_statistics_pages('total','uri',get_the_ID()); ?> 热度</span>
|
||||
<span class="comments-number"><i class="iconfont icon-mark"></i><?php comments_popup_link('NOTHING', '1 条评论', '% 条评论'); ?></span>
|
||||
<span><i class="iconfont icon-file"></i><a href="<?php echo esc_url(get_category_link($the_cat[0]->cat_ID)); ?>"><?php echo $the_cat[0]->cat_name; ?></a>
|
||||
</span>
|
||||
|
@ -34,7 +34,7 @@
|
||||
<span><i class="iconfont icon-mark"></i><?php comments_popup_link('NOTHING', '1 条评论', '% 条评论'); ?></span>
|
||||
</div>
|
||||
<div class="views">
|
||||
<span><i class="iconfont icon-attention"></i><?php echo wp_statistics_pages(total,uri,get_the_ID()); ?> 热度</span>
|
||||
<span><i class="iconfont icon-attention"></i><?php echo wp_statistics_pages('total','uri',get_the_ID()); ?> 热度</span>
|
||||
</div>
|
||||
</div>
|
||||
</footer><!-- .entry-footer -->
|
||||
|
@ -15,7 +15,7 @@
|
||||
<?php the_post_thumbnail('full'); ?>
|
||||
<header class="entry-header">
|
||||
<h1 class="entry-title"><?php the_title(); ?></h1>
|
||||
<p class="entry-census"><?php echo poi_time_since(strtotime($post->post_date)); ?> <?php echo wp_statistics_pages(total,uri,get_the_ID()); ?> 次阅读</p>
|
||||
<p class="entry-census"><?php echo poi_time_since(strtotime($post->post_date)); ?> <?php echo wp_statistics_pages('total','uri',get_the_ID()); ?> 次阅读</p>
|
||||
<hr>
|
||||
</header>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user