forked from Codeinwp/zerif-lite
-
Notifications
You must be signed in to change notification settings - Fork 0
/
footer.php
163 lines (116 loc) · 5.24 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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
<?php
/**
* The template for displaying the footer.
*
* Contains the closing of the #content div and all content after
*
* @package zerif
*/
?>
</div><!-- .site-content -->
<footer id="footer">
<div class="container">
<?php
$footer_sections = 0;
$zerif_address = get_theme_mod('zerif_address',__('Company address','zerif-lite'));
$zerif_address_icon = get_theme_mod('zerif_address_icon',get_template_directory_uri().'/images/map25-redish.png');
$zerif_email = get_theme_mod('zerif_email','<a href="mailto:[email protected]">[email protected]</a>');
$zerif_email_icon = get_theme_mod('zerif_email_icon',get_template_directory_uri().'/images/envelope4-green.png');
$zerif_phone = get_theme_mod('zerif_phone','<a href="tel:0 332 548 954">0 332 548 954</a>');
$zerif_phone_icon = get_theme_mod('zerif_phone_icon',get_template_directory_uri().'/images/telephone65-blue.png');
$zerif_socials_facebook = get_theme_mod('zerif_socials_facebook','#');
$zerif_socials_twitter = get_theme_mod('zerif_socials_twitter','#');
$zerif_socials_linkedin = get_theme_mod('zerif_socials_linkedin','#');
$zerif_socials_behance = get_theme_mod('zerif_socials_behance','#');
$zerif_socials_dribbble = get_theme_mod('zerif_socials_dribbble','#');
$zerif_copyright = get_theme_mod('zerif_copyright');
if(!empty($zerif_address) || !empty($zerif_address_icon)):
$footer_sections++;
endif;
if(!empty($zerif_email) || !empty($zerif_email_icon)):
$footer_sections++;
endif;
if(!empty($zerif_phone) || !empty($zerif_phone_icon)):
$footer_sections++;
endif;
if(!empty($zerif_socials_facebook) || !empty($zerif_socials_twitter) || !empty($zerif_socials_linkedin) || !empty($zerif_socials_behance) || !empty($zerif_socials_dribbble) ||
!empty($zerif_copyright)):
$footer_sections++;
endif;
if( $footer_sections == 1 ):
$footer_class = 'col-md-12';
elseif( $footer_sections == 2 ):
$footer_class = 'col-md-6';
elseif( $footer_sections == 3 ):
$footer_class = 'col-md-4';
elseif( $footer_sections == 4 ):
$footer_class = 'col-md-3';
else:
$footer_class = 'col-md-3';
endif;
/* COMPANY ADDRESS */
if( !empty($zerif_address) ):
echo '<div class="'.$footer_class.' company-details">';
echo '<div class="icon-top red-text">';
if( !empty($zerif_address_icon) ) echo '<img src="'.esc_url(__($zerif_address_icon,'zerif-lite')).'">';
echo '</div>';
echo $zerif_address;
echo '</div>';
endif;
/* COMPANY EMAIL */
if( !empty($zerif_email) ):
echo '<div class="'.$footer_class.' company-details">';
echo '<div class="icon-top green-text">';
if( !empty($zerif_email_icon) ) echo '<img src="'.esc_url(__($zerif_email_icon,'zerif-lite')).'">';
echo '</div>';
echo $zerif_email;
echo '</div>';
endif;
/* COMPANY PHONE NUMBER */
if( !empty($zerif_phone) ):
echo '<div class="'.$footer_class.' company-details">';
echo '<div class="icon-top blue-text">';
if( !empty($zerif_phone_icon) ) echo '<img src="'.esc_url(__($zerif_phone_icon,'zerif-lite')).'">';
echo '</div>';
echo $zerif_phone;
echo '</div>';
endif;
if( !empty($zerif_socials_facebook) || !empty($zerif_socials_twitter) || !empty($zerif_socials_linkedin) || !empty($zerif_socials_behance) || !empty($zerif_socials_dribbble) ||
!empty($zerif_copyright)):
echo '<div class="'.$footer_class.' copyright">';
if(!empty($zerif_socials_facebook) || !empty($zerif_socials_twitter) || !empty($zerif_socials_linkedin) || !empty($zerif_socials_behance) || !empty($zerif_socials_dribbble)):
echo '<ul class="social">';
/* facebook */
if( !empty($zerif_socials_facebook) ):
echo '<li><a target="_blank" href="'.esc_url(__($zerif_socials_facebook,'zerif-lite')).'"><i class="fa fa-facebook"></i></a></li>';
endif;
/* twitter */
if( !empty($zerif_socials_twitter) ):
echo '<li><a target="_blank" href="'.esc_url(__($zerif_socials_twitter,'zerif-lite')).'"><i class="fa fa-twitter"></i></a></li>';
endif;
/* linkedin */
if( !empty($zerif_socials_linkedin) ):
echo '<li><a target="_blank" href="'.esc_url(__($zerif_socials_linkedin,'zerif-lite')).'"><i class="fa fa-linkedin"></i></a></li>';
endif;
/* behance */
if( !empty($zerif_socials_behance) ):
echo '<li><a target="_blank" href="'.esc_url(__($zerif_socials_behance,'zerif-lite')).'"><i class="fa fa-behance"></i></a></li>';
endif;
/* dribbble */
if( !empty($zerif_socials_dribbble) ):
echo '<li><a target="_blank" href="'.esc_url(__($zerif_socials_dribbble,'zerif-lite')).'"><i class="fa fa-dribbble"></i></a></li>';
endif;
echo '</ul>';
endif;
if( !empty($zerif_copyright) ):
echo esc_attr($zerif_copyright);
endif;
echo '<div class="zerif-copyright-box"><a class="zerif-copyright" href="http://themeisle.com/themes/zerif-lite/" target="_blank" rel="nofollow">Zerif Lite </a>'.__('powered by','zerif-lite').'<a class="zerif-copyright" href="http://wordpress.org/" target="_blank" rel="nofollow"> WordPress</a></div>';
echo '</div>';
endif;
?>
</div> <!-- / END CONTAINER -->
</footer> <!-- / END FOOOTER -->
<?php wp_footer(); ?>
</body>
</html>