-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpage.php
61 lines (52 loc) · 1.76 KB
/
page.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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
<?php
get_header();
$onlyMembersCanView = get_post_meta(get_the_ID(), 'onlyMembersCanView', true)=== 'yes' ? true : false;
?>
<div class="page-warp">
<div class="content">
<?php while (have_posts()) : the_post(); ?>
<hgroup class="post_header">
<h2 class="post_title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
<div class="post_tag">
<?php $adis = get_option('clrs_adis');
if ($adis == "yes") {
$c_adis = "";
}
else {
$c_adis = 'style="display:none;"';
};
the_tags('', ' ', '');
?>
<span class="post_tag_col"><?php echo edit_post_link(__('<i class="fa fa-pencil-square-o"></i> 编辑', 'clrs')); ?></span>
</div>
</hgroup>
<div class="post_content"><?php
if($onlyMembersCanView && !is_user_logged_in()){
$_na_msg = get_option('clrs_noaccess');
$_na_msg = str_replace('{{page_url}}', urlencode(home_url(add_query_arg(array(),$wp->request))),$_na_msg);
echo empty($_na_msg) ? '本页面仅对登录用户开放':do_shortcode($_na_msg);
}else{
the_content();?>
<p style="text-align: right; font-size: .8em;">
最后修订于 <?php echo esc_html( get_the_modified_time('Y年m月d日') ); ?>
</p>
<?php }
?></div>
<nav class='post_nav_bds'>
<a href="<?php echo esc_url(home_url('/')); ?>" rel="home" class='goHome'>
<i class="fa fa-home" aria-hidden="true"> 返回首页</i>
</a>
<?php
$clrs_share = get_option('clrs_share');
if (!empty($clrs_share)) {
echo str_replace('{{theme_dir}}',get_template_directory_uri(),$clrs_share);
}
?>
<div style='clear: both;' />
</nav>
</div>
</div>
<?php comments_template('', true); ?>
<?php endwhile; // end of the loop. ?>
<?php get_sidebar(); ?>
<?php get_footer(); ?>