-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathfooter.php
116 lines (105 loc) · 3.03 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
<?php
/**
* The template for displaying the footer.
*
* Contains the closing of the #content div and all content after
*
* @package OKFNWP
*/
?>
</div><!-- / .row -->
</div><!-- / .container -->
</main>
<?php
$okf_theme_options = get_option( 'theme_options_option_name' );
if ( ! empty( $okf_theme_options['okfnwp_cta_message'] ) ) {
?>
<section class="footer-cta">
<div class="container">
<div class="text">
<p><?php echo esc_html( $okf_theme_options['okfnwp_cta_message'] ); ?></p>
</div>
<?php
if ( ! empty( $okf_theme_options['okfnwp_cta_link_text'] ) && ! empty( $okf_theme_options['okfnwp_cta_link_url'] ) ) {
?>
<div class="link">
<a href="<?php echo esc_html( $okf_theme_options['okfnwp_cta_link_url'] ); ?>"><?php echo esc_html( $okf_theme_options['okfnwp_cta_link_text'] ); ?></a>
</div>
<?php
}
?>
</div>
</section>
<?php
}
?>
<footer class="site-footer">
<div class="container">
<div class="footer-primary">
<a class="footer-logo" href="https://okfn.org/">
<?php require 'inc/logo.svg'; ?>
</a>
<?php
// Check if the required menu location exists and show any menu if it doesn't.
if ( has_nav_menu( 'footer-menu-1' ) ) :
wp_nav_menu(
array(
'theme_location' => 'footer-menu-1',
'container' => false,
'items_wrap' => '<ul class="footer-links">%3$s</ul>',
'fallback_cb' => false,
'depth' => 1,
)
);
else :
wp_nav_menu(
array(
'container' => false,
'items_wrap' => '<ul class="footer-links">%3$s</ul>',
'fallback_cb' => false,
'depth' => 1,
)
);
endif;
?>
</div>
<div class="footer-secondary">
<p>
<a href='https://github.com/okfn/wordpress-theme/' title='Site source code'>
<?php esc_html_e( 'Source code', 'okfnwp' ); ?> </a> <?php esc_html_e( 'available under the MIT license', 'okfnwp' ); ?>.
</p>
<p>
<a class="license" rel="license" href="https://creativecommons.org/licenses/by/4.0/">
<?php echo file_get_contents( get_stylesheet_directory() . '/assets/img/cc.svg'); ?>
<?php echo file_get_contents( get_stylesheet_directory() . '/assets/img/by.svg'); ?>
</a>
<?php esc_html_e( 'Content on this site, made by', 'okfnwp' ); ?>
<a xmlns:cc="http://creativecommons.org/ns#"
href="https://okfn.org/"
property="cc:attributionName"
rel="cc:attributionURL"><?php esc_html_e( 'Open Knowledge Foundation', 'okfnwp' ); ?></a>, <?php esc_html_e( 'is licensed under a', 'okfnwp' ); ?>
<a rel="license"
href="https://creativecommons.org/licenses/by/4.0/">
<?php esc_html_e( 'Creative Commons Attribution 4.0 International License', 'okfnwp' ); ?>
</a>.
</p>
</div>
</div>
</footer>
</div><!-- / #page-->
<?php
if ( has_nav_menu( 'primary' ) ) :
wp_nav_menu(
array(
'theme_location' => 'primary',
'container' => 'nav',
'container_id' => 'mmenu',
'items_wrap' => okf_mobile_nav_wrap(),
'fallback_cb' => false,
)
);
endif;
wp_footer();
?>
</body>
</html>