-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathfooter.php
115 lines (99 loc) · 5.08 KB
/
footer.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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
<?php
/**
* The template for displaying the footer
*
* @author Vtrois <seaton@vtrois.com>
* @license GPL-3.0
*/
?>
<?php
if(is_single()||is_page())
{
echo '<script type="application/ld+json">
{
"@context": "https://ziyuan.baidu.com/contexts/cambrian.jsonld",
"@id": "'.get_the_permalink().'",
"appid": "1644721029182998",
"title": "'.get_the_title().'",
"images": ["'.fanly_post_imgs().'"],
"pubDate": "'.get_the_time('Y-m-d\TH:i:s').'"
"upDate": "'.get_the_time('Y-m-d\TH:i:s').'"
}
</script>
';}
//获取文章中的图 last update 2018/01/22
function fanly_post_imgs()
{
global $post;
$src = '';
$content = $post->post_content;
preg_match_all('/<img .*?src=[\"|\'](.+?)[\"|\'].*?>/', $content, $strResult, PREG_PATTERN_ORDER);
$n = count($strResult[1]);
if($n >= 3){
$src = $strResult[1][0].'","'.$strResult[1][1].'","'.$strResult[1][2];
}elseif($n >= 1){
$src = $strResult[1][0];
}
return $src;
}
?>
<footer>
<div id="footer">
<div class="cd-tool text-center">
<?php if(current_user_can('manage_options')&&is_single()||is_page()){ ?><div class="cd-tool text-center"><div class="<?php if(kratos_option('cd_weixin')) echo 'edit-box2 '; ?>edit-box"><?php echo edit_post_link('<span class="fa fa-pencil"></span>'); ?></div></div><?php } ?>
<div class="<?php if(kratos_option('cd_weixin')) echo 'gotop-box2 '; ?>gotop-box"><div class="gotop-btn"><span class="fa fa-chevron-up"></span></div></div>
<?php if(kratos_option('cd_weixin')) echo '<div id="wechat-img" class="wechat-img"><span class="fa fa-weixin"></span><div id="wechat-pic"><img src="'.kratos_option('weixin_image').'"></div></div>'; ?>
<div class="search-box">
<span class="fa fa-search"></span>
<form class="search-form" role="search" method="get" id="searchform" action="<?php echo home_url('/'); ?>">
<input type="text" name="s" id="search" placeholder="Search..." style="display:none"/>
</form>
</div>
</div>
<table width="100%" height="35" border="0" align="center">
<tr>
<td>
<a class="Home11" href="#">关于我们</a>
|
</td>
</tr>
</table>
<div class="container">
<div class="row">
<div class="col-md-6 col-md-offset-3 footer-list text-center">
<p class="kratos-social-icons">
<?php echo (!kratos_option('social_weibo')) ? '' : '<a target="_blank" rel="nofollow" href="' . kratos_option('social_weibo') . '"><i class="fa fa-weibo"></i></a>'; ?>
<?php echo (!kratos_option('social_tweibo')) ? '' : '<a target="_blank" rel="nofollow" href="' . kratos_option('social_tweibo') . '"><i class="fa fa-tencent-weibo"></i></a>'; ?>
<?php echo (!kratos_option('social_twitter')) ? '' : '<a target="_blank" rel="nofollow" href="' . kratos_option('social_twitter') . '"><i class="fa fa-twitter"></i></a>'; ?>
<?php echo (!kratos_option('social_facebook')) ? '' : '<a target="_blank" rel="nofollow" href="' . kratos_option('social_facebook') . '"><i class="fa fa-facebook-official"></i></a>'; ?>
<?php echo (!kratos_option('social_linkedin')) ? '' : '<a target="_blank" rel="nofollow" href="' . kratos_option('social_linkedin') . '"><i class="fa fa-linkedin-square"></i></a>'; ?>
<?php echo (!kratos_option('social_github')) ? '' : '<a target="_blank" rel="nofollow" href="' . kratos_option('social_github') . '"><i class="fa fa-github"></i></a>'; ?>
</p>
<p>Copyright <?php echo date('Y'); ?> <a href="<?php echo get_option('home'); ?>"><?php bloginfo('name'); ?></a>. All Rights Reserved.<br>备案 <a href="http://beian.miit.gov.cn/state/outPortal/loginPortal.action" target="_blank" rel="nofollow"></a>
<?php if(kratos_option('icp_num')){?><br><a href="http://www.miitbeian.gov.cn/" rel="external nofollow" target="_blank"><?php echo kratos_option( 'icp_num' ); } ?></a><?php if(kratos_option('gov_num')){?><br><a href="<?php echo kratos_option( 'gov_link' ); ?>" rel="external nofollow" target="_blank"><i class="govimg"></i><?php echo kratos_option( 'gov_num' ); ?></a><?php }?></p><p><?php echo (!kratos_option('site_tongji')) ? '' : kratos_option('site_tongji'); ?></p>
</div>
</div>
</div>
</div>
</footer>
</div>
</div>
<?php wp_footer();?>
<?php if ( kratos_option('site_sa') ) : ?>
<script type="text/javascript">
if ($("#main").height() > $("#sidebar").height()) {
var footerHeight = 0;
if ($('#page-footer').length > 0) {
footerHeight = $('#page-footer').outerHeight(true);
}
$('#sidebar').affix({
offset: {
top: $('#sidebar').offset().top - 30,
bottom: $('#footer').outerHeight(true) + footerHeight + 6
}
});
}
</script>
<?php endif; ?>
</body>
</html>