HEX
Server: Apache
System: Linux pdx1-shared-a1-38 6.6.104-grsec-jammy+ #3 SMP Tue Sep 16 00:28:11 UTC 2025 x86_64
User: mmickelson (3396398)
PHP: 8.1.31
Disabled: NONE
Upload Files
File: /home/mmickelson/martyknows.com/wp-content/themes/blaskan/template-parts/sidebar-footer.php
<?php
$footer_layout   = get_theme_mod( 'blaskan_footer_column', 'column-4' );
$number          = str_replace( 'column-', '', $footer_layout );
$active_sidebars = array();

if ( is_active_sidebar( 'footer-sidebar' ) ) {
	$active_sidebars[] = 'footer-sidebar';
}

for ( $i = 2; $i <= $number; $i ++ ) {
	if ( is_active_sidebar( 'footer-sidebar-' . $i ) ) {
		$active_sidebars[] = 'footer-sidebar-' . $i;
	}
}

$columns_classes = array(
	1 => 'col-md-12 col-xs-12',
	2 => 'col-md-6 col-sm-12',
	3 => 'col-md-4 col-sm-12',
	4 => 'col-md-3 col-sm-6 col-xs-12'
);


if ( ! empty( $active_sidebars ) ) { 

	$class = $columns_classes[ count( $active_sidebars ) ];

	?>

    <div class="footer-widgets widget-area container">
        <div class="row">
			<?php

			foreach ( $active_sidebars as $sidebar ) {
				echo '<div class="' . $class . '">';
				dynamic_sidebar( $sidebar );
				echo '</div>';
			}

			?>
        </div>
    </div>

<?php } ?>