This repository has been archived by the owner on Mar 13, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 12
/
footer.php
71 lines (63 loc) · 3.22 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
<?php
$twitter = benenson_get_option( '_social_twitter' );
$facebook = benenson_get_option( '_social_facebook' );
$instagram = benenson_get_option( '_social_instagram' );
$youtube = benenson_get_option( '_social_youtube' );
$has_social = ( $twitter || $facebook || $instagram || $youtube );
$footer_section = [
'title' => benenson_get_option( '_footer_title' ),
'content' => benenson_get_option( '_footer_content' ),
];
?>
<footer class="page-footer" role="contentinfo" aria-label="<?php echo esc_attr( __( 'Footer', 'benenson' ) ); ?>">
<div class="container">
<?php spaceless(); ?>
<ul class="page-footerSections" aria-label="<?php echo esc_attr( __( 'Footer Menus', 'benenson' ) ); ?>">
<?php benenson_nav( 'footer-navigation' ); ?>
<?php if ( $footer_section['title'] || $footer_section['content'] ) : ?>
<li class="page-footerSection page-footerSection--large">
<?php if ( $footer_section['title'] ) : ?>
<a><?php echo esc_attr( $footer_section['title'] ); ?></a>
<?php endif; ?>
<?php if ( $footer_section['content'] ) : ?>
<?php echo wp_kses_post( apply_filters( 'the_content', $footer_section['content'] ) ); ?>
<?php endif; ?>
</li>
<?php endif; ?>
</ul>
<?php endspaceless(); ?>
<div class="page-footerBottom">
<section class="page-footerBottomHalf">
<?php if ( benenson_nav_should_display( 'footer-legal' ) ) : ?>
<nav class="page-footerBottomNav">
<ul><?php benenson_nav( 'footer-legal' ); ?></ul>
</nav>
<?php endif; ?>
<span class="page-footerCopyright">© <?php echo esc_html( date( 'Y' ) ); ?> <?php bloginfo( 'title' ); ?></span>
</section>
<?php if ( $has_social ) : ?>
<section class="page-footerBottomHalf page-footerSocialContainer">
<h3 class="page-footerBottomTitle" aria-label="<?php echo esc_attr( /* translators: Social Media sharing options */ __( 'Follow us on:', 'benenson' ) ); ?>"><?php esc_html_e( 'Follow us on:', 'benenson' ); ?> </h3>
<ul class="page-footerSocial">
<?php if ( $facebook ) : ?>
<li><a target="_blank" rel="noopener" href="<?php echo esc_url( $facebook ); ?>" aria-label="<?php echo esc_attr( __( 'Follow us on Facebook', 'benenson' ) ); ?>"><span class="social-facebook">Facebook</span></a></li>
<?php endif; ?>
<?php if ( $twitter ) : ?>
<li><a target="_blank" rel="noopener" href="<?php echo esc_url( $twitter ); ?>" aria-label="<?php echo esc_attr( __( 'Follow us on Twitter', 'benenson' ) ); ?>"><span class="social-twitter">Twitter</span></a></li>
<?php endif; ?>
<?php if ( $youtube ) : ?>
<li><a target="_blank" rel="noopener" href="<?php echo esc_url( $youtube ); ?>" aria-label="<?php echo esc_attr( __( 'Subscribe to our YouTube channel', 'benenson' ) ); ?>"><span class="social-youtube">YouTube</span></a></li>
<?php endif; ?>
<?php if ( $instagram ) : ?>
<li><a target="_blank" rel="noopener" href="<?php echo esc_url( $instagram ); ?>" aria-label="<?php echo esc_attr( __( 'Follow us on Instagram', 'benenson' ) ); ?>"><span class="social-instagram">Instagram</span></a></li>
<?php endif; ?>
</ul>
</section>
<?php endif; ?>
</div>
</div>
</footer>
<?php wp_footer(); ?>
<script>App.default();</script>
</body>
</html>