63 lines
2.2 KiB
PHP
63 lines
2.2 KiB
PHP
<?php
|
|
/**
|
|
* The Sidebar containing the footer widget areas.
|
|
*
|
|
* @package Sophia After Dark
|
|
* @since 1.0.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( 'footer-sidebar' ) &&
|
|
! is_active_sidebar( 'footer-sidebar-2' ) &&
|
|
! is_active_sidebar( 'footer-sidebar-3' ) &&
|
|
! is_active_sidebar( 'footer-sidebar-4' ) ) {
|
|
return;
|
|
}
|
|
|
|
$layout = get_theme_mod( 'sophia_after_dark_widget_area_layout', 'column-three' );
|
|
?>
|
|
|
|
<div id="top-footer" class="footer-widgets-wrapper footer-<?php echo esc_attr( $layout ); ?> sad-clearfix">
|
|
<div class="sad-container">
|
|
<div class="footer-widgets-area sad-clearfix">
|
|
<div class="sad-footer-widget-wrapper sad-column-wrapper sad-clearfix">
|
|
|
|
<?php
|
|
// Footer widget 1 (always shown)
|
|
echo '<div class="sad-footer-widget wow fadeInLeft" data-wow-duration="0.3s">';
|
|
dynamic_sidebar( 'footer-sidebar' );
|
|
echo '</div>';
|
|
|
|
// Footer widget 2 (shown in all but column-one layout)
|
|
if ( $layout !== 'column-one' ) {
|
|
echo '<div class="sad-footer-widget wow fadeInLeft" data-wow-duration="0.6s">';
|
|
dynamic_sidebar( 'footer-sidebar-2' );
|
|
echo '</div>';
|
|
}
|
|
|
|
// Footer widget 3 (only for three or four column layouts)
|
|
if ( in_array( $layout, [ 'column-three', 'column-four' ], true ) ) {
|
|
echo '<div class="sad-footer-widget wow fadeInLeft" data-wow-duration="0.9s">';
|
|
dynamic_sidebar( 'footer-sidebar-3' );
|
|
echo '</div>';
|
|
}
|
|
|
|
// Footer widget 4 (only for four column layout)
|
|
if ( $layout === 'column-four' ) {
|
|
echo '<div class="sad-footer-widget wow fadeInLeft" data-wow-duration="1.2s">';
|
|
dynamic_sidebar( 'footer-sidebar-4' );
|
|
echo '</div>';
|
|
}
|
|
?>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|