Example #1
0
function tin_post_meta($special = 0)
{
    $thelayout = the_layout();
    if (is_singular()) {
        ?>
	<div id="single-meta">
		<span class="single-meta-author"><i class="fa fa-user">&nbsp;</i><?php 
        the_author_posts_link();
        ?>
</span>
		<span class="single-meta-time"><i class="fa fa-calendar">&nbsp;</i><?php 
        echo timeago(get_gmt_from_date(get_the_time('Y-m-d G:i:s')));
        ?>
</span>
		<?php 
        if (is_single()) {
            ?>
<span class="single-meta-category"><i class="fa fa-folder-open">&nbsp;</i><?php 
            the_category(' ', '');
            ?>
</span><?php 
        }
        ?>
		<?php 
        if (current_user_can('level_7')) {
            ?>
<span class="single-meta-edit"><i class="fa fa-edit">&nbsp;</i><?php 
            edit_post_link(__(' 编辑 ', 'tinection'));
            ?>
</span><?php 
        }
        ?>
		<span class="single-meta-comments"><?php 
        if (comments_open()) {
            ?>
|&nbsp;&nbsp;<i class="fa fa-comments"></i>&nbsp;<a href="#" class="commentbtn"><?php 
            comments_number(__('抢沙发', 'tinection'), __('1 条评论', 'tinection'), __('% 条评论', 'tinection'));
            ?>
</a><?php 
        } else {
            ?>
|&nbsp;<i class="fa fa-comments"></i><?php 
            _e(' 评论关闭', 'tinection');
        }
        ?>
</span>
		<span class="single-meta-views"><i class="fa fa-fire"></i>&nbsp;<?php 
        echo get_tin_traffic('single', get_the_ID());
        ?>
&nbsp;</span>
	</div>
	<?php 
    } elseif (is_search() || is_home() && $thelayout == 'blog' || is_category() && $special == 0 || is_tag() || is_date()) {
        ?>
	<div class="meta">
		<?php 
        if (!is_category()) {
            ?>
<span class="postlist-meta-cat"><i class="fa fa-bookmark"></i><?php 
            the_category(' ', false);
            ?>
</span><?php 
        }
        ?>
		<span class="postlist-meta-time"><i class="fa fa-calendar"></i><?php 
        echo timeago(get_gmt_from_date(get_the_time('Y-m-d G:i:s')));
        ?>
</span>
		<span class="postlist-meta-views"><i class="fa fa-fire"></i><?php 
        echo '浏览: ' . get_tin_traffic('single', get_the_ID());
        ?>
</span>
		<span class="postlist-meta-comments"><?php 
        if (comments_open()) {
            ?>
<i class="fa fa-comments"></i><a href="<?php 
            comments_link();
            ?>
"><?php 
            comments_number(__('<span>评论: </span>0', 'tinection'), __('<span>评论: </span>1', 'tinection'), __('<span>评论: </span>%', 'tinection'));
            ?>
</a><?php 
        }
        ?>
</span>
	</div>
	<?php 
    } elseif (is_home() || is_category() && $special == 1) {
        ?>
	<div class="postlist-meta">
		<div class="postlist-meta-time"><i class="fa fa-calendar"></i>&nbsp;<?php 
        echo date('Y-m-j', get_the_time('U'));
        ?>
</div>
		<div class="postlist-meta-views" style="float:right;"><i class="fa fa-fire"></i>&nbsp;<?php 
        echo get_tin_traffic('single', get_the_ID());
        ?>
</div>
		<?php 
        get_template_part('includes/like_collect_meta');
        ?>
	</div>
	<?php 
    } else {
        ?>
	<div id="single-meta">
		<span class="single-meta-author"><i class="fa fa-user">&nbsp;</i><?php 
        the_author_posts_link();
        ?>
</span>
		<span class="single-meta-edit"><?php 
        edit_post_link(__(' 编辑 ', 'tinection'));
        ?>
</span>
		<span class="single-meta-time"><i class="fa fa-calendar">&nbsp;</i><?php 
        echo timeago(get_gmt_from_date(get_the_time('Y-m-d G:i:s')));
        ?>
</span>
		<span class="single-meta-comments"><?php 
        if (comments_open()) {
            ?>
|&nbsp;&nbsp;<i class="fa fa-comments"></i>&nbsp;<a href="<?php 
            comments_link();
            ?>
"><?php 
            comments_number(__('0 条评论', 'tinection'), __('1 条评论', 'tinection'), __('% 条评论', 'tinection'));
            ?>
</a><?php 
        } else {
            ?>
|&nbsp;<i class="fa fa-comments"></i><?php 
            _e(' 评论关闭', 'tinection');
        }
        ?>
</span>
		<span class="single-meta-views"><i class="fa fa-fire"></i>&nbsp;<?php 
        echo get_tin_traffic('single', get_the_ID());
        ?>
&nbsp;</span>
	</div>
	<?php 
    }
}
Example #2
0
?>
</div>
	</div>
</span>
<!-- /.QR -->

<!-- Simplified or Traditional -->
<span id="zh-cn-tw" class="mobile-hide"><i><a id="StranLink"><?php 
_e('繁', 'tinection');
?>
</a></i></span>
<!-- /.Simplified or Traditional -->

<!-- Layout Switch -->
<?php 
$layout = the_layout();
if (is_home() && $layout == 'blog') {
    ?>
<span id="layoutswt" class="mobile-hide">
		<i class="fa fa-th is_blog" src="<?php 
    echo get_bloginfo('url');
    ?>
"></i>
</span>
<?php 
} elseif (is_home() && $layout == 'cms') {
    ?>
<span id="layoutswt" class="mobile-hide">
		<i class="fa fa-th-large is_cms" src="<?php 
    echo get_bloginfo('url');
    ?>
Example #3
0
?>
		</div>
	</div>	
</footer>
<script type="text/javascript">
	$('.site_loading').animate({'width':'90%'},50);  //第四个节点
</script>
</div>
</section>
<?php 
get_template_part('includes/loginbox');
get_template_part('includes/floatbutton');
?>
<!-- /.Footer Nav Wrap -->
<?php 
$thelayout = the_layout();
if (is_home() && $thelayout == 'blocks') {
    ?>
<script type="text/javascript" src="<?php 
    bloginfo('template_directory');
    ?>
/includes/js/jquery.masonry.js"></script>
<script type="text/javascript">
	$(function(){
		var $container = $('#fluid_blocks'),
			$items = $('#fluid_blocks .masonry-box');
		$items.imagesLoaded(function(){
			$items.fadeIn();
			$container.masonry({
				itemSelector:'.masonry-box',
				gutterWidth:0,