<?php
/**
* Template part for displaying footer layout three
*
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/
*
* @package arsha
*/
// Footer Copyright Menu
$footer_copyright_menu_switch = get_theme_mod( 'footer_copyright_menu_switch',false );
$footer_copyright_menu = get_theme_mod( 'footer_copyright_menu', __( 'Paste your copyright menu items here', 'arsha' ) );
$footer_social_switch = get_theme_mod( 'footer_social_switch',false );
$footer_copyright_column = $footer_social_switch ? 'col-xl-6 col-lg-6 col-md-6 col-sm-6' : 'col-xl-12';
$footer_copyright_border = $footer_social_switch ? 'mtborder text-center' : '';
$footer_copyright_padding = is_active_sidebar('footer-1') ? 'pb-60' : 'pb-0';
//footer bg image & color
$arsha_footer_bg_url_from_page = function_exists( 'tpmeta_image_field' ) ? tpmeta_image_field( 'arsha_footer_bg_image' ) : '';
$arsha_footer_bg_color_from_page = function_exists( 'tpmeta_field' ) ? tpmeta_field( 'arsha_footer_bg_color' ) : '';
$footer_bg_img = get_theme_mod( 'footer_bg_image' );
$footer_bg_color = get_theme_mod( 'footer_bg_color' );
// bg image
$bg_img = !empty( $arsha_footer_bg_url_from_page['url'] ) ? $arsha_footer_bg_url_from_page['url'] : $footer_bg_img;
// bg color
$bg_color = !empty( $arsha_footer_bg_color_from_page ) ? $arsha_footer_bg_color_from_page : $footer_bg_color;
// footer_columns
$footer_columns = 0;
$footer_widgets_col_number = get_theme_mod( 'footer_widget_number', 4 );
switch ( $footer_widgets_col_number ) {
case '1':
$footer_class[1] = 'col-lg-12';
break;
case '2':
$footer_class[1] = 'col-lg-6 col-md-6';
$footer_class[2] = 'col-lg-6 col-md-6';
break;
case '3':
$footer_class[1] = 'col-xl-4 col-lg-6 col-md-5 f-col-1';
$footer_class[2] = 'col-xl-4 col-lg-6 col-md-7 f-col-2';
$footer_class[3] = 'col-xl-4 col-lg-6 f-col-3';
break;
case '4':
$footer_class[1] = 'col-xl-3 col-lg-3 col-md-4 col-sm-6';
$footer_class[2] = 'col-xl-3 col-lg-3 col-md-4 col-sm-6';
$footer_class[3] = 'col-xl-3 col-lg-3 col-md-4 col-sm-6';
$footer_class[4] = 'col-xl-3 col-lg-3 col-md-4 col-sm-6';
break;
default:
$footer_class = 'col-xl-3 col-lg-3 col-md-6';
break;
}
?>
<!-- footer start -->
<footer class="mt-footer-area p-relative black-bg-2 <?php echo esc_attr($footer_copyright_padding); ?>">
<div class="container">
<?php if ( is_active_sidebar('footer-1') OR is_active_sidebar('footer-2') OR is_active_sidebar('footer-3') OR is_active_sidebar('footer-4') ): ?>
<div class="mt-footer-main-wrapper pt-120 mb-25">
<div class="row">
<?php
for ( $num = 1; $num <= $footer_widgets_col_number; $num++ ) {
print '<div class="' . esc_attr( $footer_class[$num] ) . '">';
dynamic_sidebar( 'footer-' . $num );
print '</div>';
}
?>
</div>
</div>
<?php endif; ?>
<?php if(!empty($footer_copyright_menu_switch)) : ?>
<div class="mt-footer-copyright-area mt-footer-copyright-space p-relative " data-bg-color="<?php print esc_attr( $bg_color );?>">
<div class="row align-items-center">
<?php echo arsha_kses($footer_copyright_menu); ?>
</div>
<div class="mt-footer-copyright-text <?php echo esc_attr($footer_copyright_border); ?>">
<?php if($footer_social_switch) : ?>
<div class="mt-footer-copyright-social mb-10">
<?php arsha_footer_social_profiles(); ?>
</div>
<?php endif; ?>
<div class="mt-footer-copyright-bottom text-center">
<p><?php arsha_copyright_text(); ?></p>
</div>
</div>
</div>
<?php endif; ?>
<?php if(empty($footer_copyright_menu_switch)) : ?>
<div class="mt-footer-copyright-area pb-10 pt-15 p-relative ">
<div class="mt-footer-copyright-text">
<div class="mt-footer-copyright-bottom text-center">
<p data-color="rgba(255, 255, 255, 0.5)"><?php arsha_copyright_text(); ?></p>
</div>
</div>
</div>
<?php endif; ?>
</div>
</footer>