-
Notifications
You must be signed in to change notification settings - Fork 15
/
sidebar-footer.php
55 lines (47 loc) · 1.29 KB
/
sidebar-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
<?php
/**
* The Sidebar containing the footer widget areas.
*
* @package ThemeGrill
* @subpackage eStore
* @since eStore 1.0
*/
/**
* The footer widget area is triggered if any of the areas
* have widgets. So let's check that first.
*
* If none of the sidebars have widgets, then let's bail early.
*/
if( !is_active_sidebar( 'estore_footer_sidebar1' ) &&
!is_active_sidebar( 'estore_footer_sidebar2' ) &&
!is_active_sidebar( 'estore_footer_sidebar3' ) &&
!is_active_sidebar( 'estore_footer_sidebar4' ) ) {
return;
}
?>
<div id="top-footer" class="clearfix">
<div class="tg-container">
<div class="tg-inner-wrap">
<div class="top-content-wrapper">
<div class="tg-column-wrapper">
<?php
do_action( 'estore_before_footer_sidebar' );
$footer_sidebar_count = get_theme_mod('estore_footer_widgets', '4');
$footer_sidebar_class = 'tg-column-'. $footer_sidebar_count;
for ($i = 1; $i <= $footer_sidebar_count; $i++ ) {
?>
<div class="<?php echo $footer_sidebar_class; ?> footer-block">
<?php
if ( is_active_sidebar( 'estore_footer_sidebar'.$i) ) {
dynamic_sidebar( 'estore_footer_sidebar'.$i);
}
?>
</div>
<?php }
do_action( 'estore_after_footer_sidebar' );
?>
</div>
</div>
</div>
</div>
</div>