-
Notifications
You must be signed in to change notification settings - Fork 0
/
footer.php
102 lines (97 loc) · 3.19 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
<?php $curr_lang = get_curr_lang(); ?>
<footer class='footer'>
<div class='max-width'>
<div class='row'>
<div class='col col-6 left'>
<div class='col-content'>
<div class='row'>
<div class='col col-12 col-sm-12 col-md-6 left'>
<?php if( $menu_items = wp_get_nav_menu_items( 'main' ) ): ?>
<nav id="main-nav-footer">
<ol>
<?php foreach( $menu_items as $i => $menu_item ) {
$menu_item_id = $menu_item->object_id;
$trans_page_id = get_lang_post( $menu_item_id, $curr_lang );
if( $trans_page_id ) {
$menu_item_id = $trans_page_id;
}
$menu_item_page = get_post( $menu_item_id ); ?>
<li class="menu_item">
<a href="<?= get_permalink( $menu_item_id ) ?>"><?= $menu_item_page->post_title ?></a>
</li>
<?php } ?>
</ol>
</nav>
<?php endif; ?>
</div>
<div class='col col-12 col-sm-12 col-md-6 right'>
<?php if( $menu_items = wp_get_nav_menu_items( 'footer' ) ): ?>
<nav id="footer-nav-footer">
<ol>
<?php foreach( $menu_items as $i => $menu_item ) {
$menu_item_id = $menu_item->object_id;
$trans_page_id = get_lang_post( $menu_item_id, $curr_lang );
if( $trans_page_id ) {
$menu_item_id = $trans_page_id;
}
$menu_item_page = get_post( $menu_item_id ); ?>
<li class="menu_item">
<a href="<?= get_permalink( $menu_item_id ) ?>"><?= $menu_item_page->post_title ?></a>
</li>
<?php } ?>
</ol>
</nav>
<?php endif; ?>
</div>
</div>
</div>
</div>
<div class='col col-6 right'>
<div class='col-content'>
The <strong>Four Corners Project</strong> is free and open source. You can view the source code and contribute on <a href="https://github.com/four-corners/four-corners.js" target="_blank">GitHub</a>.
<br/><br/>
This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc/4.0/">Creative Commons Attribution-NonCommercial 4.0 International License</a>.
<?php if( is_user_logged_in() ) { ?>
<br/><br/>
<div id="lang-switch-footer">
<ol>
<?php
$langs = get_lang_list( array(
'fields' => 'locale'
) );
$lang_names = get_lang_list( array(
'fields' => 'name'
) );
foreach( $langs as $index => $lang ) { ?>
<li>
<?php $trans_post_id = get_lang_post( $post->ID, $lang ); ?>
<a href="<?= get_permalink( $trans_post_id ); ?>">
<?= $lang_names[$index] ?>
</a>
</li>
<?php } ?>
</ol>
</div>
<?php } ?>
</div>
</div>
</div>
<div class="row">
<div class="col col-12">
<div class="col-content">
</div>
</div>
</div>
</div>
</footer>
</div>
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-55531055-4"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-55531055-4');
</script>
<?php wp_footer(); ?>
</body>
</html>