-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfooter.php
63 lines (52 loc) · 3.09 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
<?php
use friendlyrobot\Theme as Theme;
?>
<footer class="theme-footer mx-0 px-0 container-fluid">
<section class="pre-footer-donate">
<?php get_template_part( 'template-parts/footer/pre-footer-donate' ); ?>
</section>
<section class="pre-footer">
<?php get_template_part( 'template-parts/footer/pre-footer' ); ?>
</section>
<div class="row mx-0 d-flex flex-row footer-row footer-bottom">
<div class="copyright">Copyright <?php echo date('Y') . ' ' . Theme::nicename ?></div>
<?php
/* get social menu */
$fblink = \carbon_get_theme_option('crb_facebook_link');
$fblogo = \carbon_get_theme_option('crb_facebook_logo') ? \carbon_get_theme_option('crb_facebook_logo') : get_template_directory_uri().'/theme/assets/social-fb.svg';
$twlink = \carbon_get_theme_option('crb_twitter_link');
$twlogo = \carbon_get_theme_option('crb_twitter_logo') ? \carbon_get_theme_option('crb_twitter_logo') : get_template_directory_uri().'/theme/assets/social-ig.svg';
$iglink = \carbon_get_theme_option('crb_instagram_link');
$iglogo = \carbon_get_theme_option('crb_instagram_logo') ? \carbon_get_theme_option('crb_instagram_logo') : get_template_directory_uri().'/theme/assets/social-tw.svg';
$youtubelink = \carbon_get_theme_option('crb_youtube_link');
$youtubelogo = \carbon_get_theme_option('crb_youtube_logo') ? \carbon_get_theme_option('crb_youtube_logo') : get_template_directory_uri().'/theme/assets/social-yt.svg';
$footerul = '<ul class="footer-social">';
$footerli = '';
if($fblink && $fblogo) {
$footerli.= '<li><a target="_blank" href="'.$fblink.'">';
$footerli.='<span class="social-fb" style="background-image:url(';
$footerli.= $fblogo.');"></span></a></li>';
}
if($twlink && $twlogo) {
$footerli.= '<li><a target="_blank" href="'.$twlink.'">';
$footerli.='<span class="social-tw" style="background-image:url(';
$footerli.= $twlogo.');"></span></a></li>';
}
if($iglink && $iglogo) {
$footerli.= '<li><a target="_blank" href="'.$iglink.'">';
$footerli.='<span class="social-ig" style="background-image:url(';
$footerli.= $iglogo.');"></span></a></li>';
}
if($youtubelink && $youtubelogo) {
$footerli.= '<li><a target="_blank" href="'.$youtubelink.'">';
$footerli.='<span class="social-yt" style="background-image:url(';
$footerli.= $youtubelogo.');"></span></a></li>';
}
if( strlen($footerli) ){
echo $footerul . $footerli . '</ul>';
}
?>
</div>
</footer>
</div>
<?php wp_footer(); ?>