forked from davidperel/layerswp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfooter.php
58 lines (49 loc) · 2.53 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
<div id="back-to-top">
<a href="#top"><?php _e( 'Back to top' , 'layerswp' ); ?></a>
</div> <!-- back-to-top -->
</section>
<?php do_action( 'layers_before_footer' ); ?>
<footer id="footer" <?php layers_wrapper_class( 'footer_site', 'footer-site' ); ?>>
<?php do_action( 'layers_before_footer_inner' ); ?>
<div class="<?php if( 'layout-fullwidth' != layers_get_theme_mod( 'footer-width' ) ) echo 'container'; ?> clearfix">
<?php // Do logic related to the footer widget area count
$footer_sidebar_count = layers_get_theme_mod( 'footer-sidebar-count' ); ?>
<?php if( 0 != $footer_sidebar_count ) { ?>
<?php do_action( 'layers_before_footer_sidebar' ); ?>
<div class="row">
<?php // Default Sidebar count to 4
if( '' == $footer_sidebar_count ) $footer_sidebar_count = 4;
// Get the sidebar class
$footer_sidebar_class = floor( 12/$footer_sidebar_count ); ?>
<?php for( $footer = 1; $footer <= $footer_sidebar_count; $footer++ ) { ?>
<div class="column span-<?php echo esc_attr( $footer_sidebar_class ); ?> <?php if( $footer == $footer_sidebar_count ) echo 'last'; ?>">
<?php dynamic_sidebar( LAYERS_THEME_SLUG . '-footer-' . $footer ); ?>
</div>
<?php } ?>
</div>
<?php do_action( 'layers_after_footer_sidebar' ); ?>
<?php } // if 0 != sidebars ?>
<?php do_action( 'layers_before_footer_copyright' ); ?>
<div class="row copyright">
<?php if( '' != layers_get_theme_mod( 'footer-copyright-text' ) ) { ?>
<div class="column span-6">
<p class="site-text"><?php echo esc_html( layers_get_theme_mod( 'footer-copyright-text' ) ); ?></p>
</div>
<?php } ?>
<div class="column span-6 clearfix t-right">
<?php wp_nav_menu( array( 'theme_location' => LAYERS_THEME_SLUG . '-footer' , 'container' => 'nav', 'container_class' => 'nav nav-horizontal pull-right', 'fallback_cb' => false )); ?>
</div>
</div>
<?php do_action( 'layers_after_footer_copyright' ); ?>
</div>
<?php do_action( 'layers_after_footer_inner' ); ?>
<?php if( false != layers_get_theme_mod( 'show-layers-badge' ) ) { ?>
<?php _e( sprintf( '<a class="created-using-layers" target="_blank" tooltip="Built with Layers" href="%s"><span>Built with Layers</span></a>', 'http://www.layerswp.com' ) , 'layerswp' ); ?>
<?php } ?>
</footer><!-- END / FOOTER -->
<?php do_action( 'layers_after_footer' ); ?>
</section><!-- END / MAIN SITE #wrapper -->
<?php do_action( 'layers_after_site_wrapper' ); ?>
<?php wp_footer(); ?>
</body>
</html>