forked from purothemes/polestar
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfooter.php
82 lines (66 loc) · 2.57 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
<?php
/**
* The template for displaying the footer.
*
* Contains the closing of the #content div and all content after.
*
* @link https://developer.wordpress.org/themes/basics/template-files/#template-partials
*
* @package polestar
* @license GPL 2.0
*/
$footer_widgets = is_active_sidebar( 'sidebar-footer' ) == true;
$footer_widgets_page_setting = puro_page_setting( 'footer_widgets', true );
?>
</div><!-- .polestar-container -->
</div><!-- #content -->
<?php do_action( 'polestar_footer_before' ); ?>
<footer id="colophon" class="site-footer <?php if ( ! is_page() && $footer_widgets || is_page() && ( $footer_widgets && $footer_widgets_page_setting ) ) echo 'footer-active-sidebar'; if ( get_theme_mod( 'footer_layout' ) == 'full-width' ) echo ' full-width'; ?>">
<?php do_action( 'polestar_footer_top' ); ?>
<?php if ( $footer_widgets_page_setting ) : ?>
<div class="polestar-container">
<?php
if ( is_active_sidebar( 'sidebar-footer' ) ) {
$polestar_footer_sidebars = wp_get_sidebars_widgets();
?>
<div class="widgets widgets-<?php echo count( $polestar_footer_sidebars['sidebar-footer'] ) ?>" aria-label="<?php esc_attr_e( 'Footer Widgets', 'polestar' ); ?>">
<?php dynamic_sidebar( 'sidebar-footer' ); ?>
</div>
<?php
}
?>
</div><!-- .polestar-container -->
<?php endif; ?>
<div class="bottom-bar">
<div class="polestar-container">
<div class="site-info">
<?php
polestar_footer_text();
if ( function_exists( 'the_privacy_policy_link' ) && get_theme_mod( 'footer_privacy_policy_link', true ) ) {
the_privacy_policy_link( '', '. ' );
}
$credit_text = apply_filters(
'polestar_footer_credits',
sprintf( esc_html__( 'Theme by %s', 'polestar' ), '<a href="https://purothemes.com/">Puro</a>.' )
);
if ( ! empty( $credit_text ) ) {
echo wp_kses_post( $credit_text );
}
?>
</div><!-- .site-info -->
<?php wp_nav_menu( array( 'theme_location' => 'menu-2', 'container_class' => 'footer-menu', 'depth' => 1, 'fallback_cb' => '' ) ); ?>
</div><!-- .polestar-container -->
</div><!-- .bottom-bar -->
<?php do_action( 'polestar_footer_bottom' ); ?>
</footer><!-- #colophon -->
</div><!-- #page -->
<?php if ( get_theme_mod( 'scroll_to_top', true ) ) : ?>
<div id="scroll-to-top">
<span class="screen-reader-text"><?php esc_html_e( 'Scroll to top', 'polestar' ); ?></span>
<?php polestar_display_icon( 'up-arrow' ); ?>
</div>
<?php endif; ?>
<?php wp_footer(); ?>
<?php do_action( 'polestar_footer_after' ); ?>
</body>
</html>