forked from Teplitsa/kandinsky
-
Notifications
You must be signed in to change notification settings - Fork 0
/
footer.php
147 lines (124 loc) · 4.65 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
<?php
/**
* The template for displaying the footer.
*
* Contains the closing of the #content div and all content after
*
* @package Kandinsky
*/
$copyright = sprintf( __( 'All materials of the site are avaliabe under license %s', 'knd' ), '<a href="https://creativecommons.org/licenses/by-sa/3.0/" target="_blank">' . esc_html__( 'Creative Commons СС-BY-SA 3.0', 'knd' ) . '</a>' );
?>
</main><!-- .knd-main -->
<footer class="knd-footer">
<?php if ( get_theme_mod( 'footer_social', true ) || get_theme_mod( 'footer_logo', true ) ) { ?>
<div id="bottom_bar" class="bottom-bar">
<div class="knd-container">
<div class="flex-row align-bottom">
<div class="flex-cell flex-md-6">
<?php knd_footer_logo(); ?>
</div>
<div class="flex-cell flex-md-6 links-right">
<?php
if ( get_theme_mod( 'footer_social', true ) ) {
knd_social_links();
}
?>
</div>
</div>
</div>
</div>
<?php } ?>
<div class="knd-container">
<?php if ( get_theme_mod( 'footer_about' ) || get_theme_mod( 'footer_menu_ourwork' ) || get_theme_mod( 'footer_menu_news' ) || get_theme_mod( 'footer_policy' ) ) { ?>
<div class="widget-area">
<?php if ( get_theme_mod( 'footer_about' ) ) { ?>
<div class="widget-bottom widget-bottom-about">
<?php if ( get_theme_mod( 'footer_about_title' ) ) { ?>
<h2 class="widget-title"><?php echo get_theme_mod( 'footer_about_title', esc_html__( 'About Us', 'knd' ) ); ?></h2>
<?php } ?>
<div class="textwidget">
<?php echo do_shortcode( wpautop( get_theme_mod( 'footer_about' ) ) ); ?>
</div>
</div>
<?php } ?>
<?php
if ( get_theme_mod( 'footer_menu_ourwork' ) && is_nav_menu( get_theme_mod( 'footer_menu_ourwork' ) ) ) {
$before = '';
if ( get_theme_mod( 'footer_menu_ourwork_title' ) ) {
$before = '<h2 class="widget-title">' . get_theme_mod( 'footer_menu_ourwork_title', esc_html__( 'Our Work', 'knd' ) ) . '</h2>';
}
wp_nav_menu(
array(
'menu' => get_theme_mod( 'footer_menu_ourwork' ),
'container' => 'div',
'container_class' => 'widget-bottom widget-bottom-menu',
'depth' => 1,
'items_wrap' => $before . '<ul class="%2$s">%3$s</ul>',
)
);
}
?>
<?php
if ( get_theme_mod( 'footer_menu_news' ) && is_nav_menu( get_theme_mod( 'footer_menu_news' ) ) ) {
$before = '';
if ( get_theme_mod( 'footer_menu_news_title' ) && ' ' !== get_theme_mod( 'footer_menu_news_title' ) ) {
$before = '<h2 class="widget-title">' . get_theme_mod( 'footer_menu_news_title', esc_html__( 'News', 'knd' ) ) . '</h2>';
} else if ( ' ' === get_theme_mod( 'footer_menu_news_title' ) ) {
$before = '<div class="widget-title"> </div>';
}
wp_nav_menu(
array(
'menu' => get_theme_mod( 'footer_menu_news' ),
'container' => 'div',
'container_class' => 'widget-bottom widget-bottom-menu',
'depth' => 1,
'items_wrap' => $before . '<ul class="%2$s">%3$s</ul>',
)
);
}
?>
<?php if ( get_theme_mod( 'footer_policy' ) ) { ?>
<div class="widget-bottom widget-bottom-policy">
<?php if ( get_theme_mod( 'footer_policy_title' ) ) { ?>
<h2 class="widget-title"><?php echo get_theme_mod( 'footer_policy_title', esc_html__( 'Security policy', 'knd' ) ); ?></h2>
<?php } ?>
<div class="textwidget">
<?php echo do_shortcode( wpautop( get_theme_mod( 'footer_policy' ) ) ); ?>
</div>
</div>
<?php } ?>
</div>
<?php } ?>
<?php if ( get_theme_mod( 'footer_copyright', true ) && get_theme_mod( 'footer_copyright', true ) ) { ?>
<div class="hr"></div>
<div class="flex-row footer-credits align-center">
<div class="flex-cell flex-sm-8 flex-md-6">
<?php if ( get_theme_mod( 'footer_copyright', true ) ) { ?>
<div class="copy">
<?php echo get_theme_mod( 'footer_copyright_text', $copyright ); ?>
</div>
<?php } ?>
</div>
<?php if ( get_theme_mod( 'footer_creator', true ) ) { ?>
<div class="flex-cell flex-sm-4 flex-md-6">
<div class="knd-brand">
<a href="<?php echo esc_attr( KND_OFFICIAL_WEBSITE_URL ); ?>" target="_blank">
<div class="support"><?php esc_html_e( 'Powered by Kandinsky', 'knd' ); ?></div>
<div class="knd-banner">
<svg class="knd-icon pic-knd">
<title><?php esc_html_e( 'Kandinsky logo', 'knd' ); ?></title>
<use xlink:href="#pic-knd" />
</svg>
</div>
</a>
</div>
</div>
<?php } ?>
</div>
<?php } ?>
</div>
</footer>
<?php do_action( 'knd_before_wp_footer' ); ?>
<?php wp_footer(); ?>
</body>
</html>