<?php global $cyarb_opt;
/**
* The template for displaying the footer
* @package cyarb
*/
// Footer Widget
if(!is_active_sidebar( 'cyarb_footer_one' ) && !is_active_sidebar( 'cyarb_footer_two' ) && !is_active_sidebar( 'cyarb_footer_three' ) && !is_active_sidebar( 'cyarb_footer_four' ) && !is_active_sidebar( 'cyarb_footer_five' ) ) {
$footer_padding = 'footer-top-padding';
} else {
$footer_padding = '';
}
$footer_col = isset( $cyarb_opt['footer_col']) ? $cyarb_opt['footer_col'] : 'column-4';
$theme_default_opt = isset( $cyarb_opt['theme_default_opt']) ? $cyarb_opt['theme_default_opt'] : false;
if( $footer_col == 'column-2'):
$col_cls = 'col-lg-6 col-sm-6';
elseif( $footer_col == 'column-4'):
$col_cls = 'col-lg-3 col-sm-6';
else:
$col_cls = 'col-lg-4 col-sm-6';
endif;
// cta shape image
if( isset( $cyarb_opt['cyarb_cta_image_shape'] ) ):
$cta_shape = $cyarb_opt['cyarb_cta_image_shape'];
else:
$cta_shape = '';
endif;
$cta_enable = isset( $cyarb_opt['cyarb_cta_enable']) ? $cyarb_opt['cyarb_cta_enable'] : '1';
$partner_logo = isset( $cyarb_opt['cyarb_pl_enable']) ? $cyarb_opt['cyarb_pl_enable'] : '1';
// ACF field access
if (class_exists( 'ACF') && get_field('partner_logos')){
$part_img = get_field('partner_logos');
} else {
$part_img = '';
}
// Button
if( isset($cyarb_opt['cta_link_to_page']) ):
$button_text = $cyarb_opt['cta_button_text'];
$btn_link_type = $cyarb_opt['cta_btn_link_type'];
if( $btn_link_type == 'cta_link_to_page') {
// Page link
$btn_link = get_page_link( $cyarb_opt['cta_link_to_page'] );
} else {
$btn_link = $cyarb_opt['cta_external_link'];
}
else:
$button_text = '';
$btn_link = '';
endif;
$footer_shape = isset( $cyarb_opt['cyarb_footer_image_shape']) ? $cyarb_opt['cyarb_footer_image_shape'] : 1;
$banner_bg = isset( $cyarb_opt['cyarb_footer_bg']['url']) ? $cyarb_opt['cyarb_footer_bg']['url'] : '';
$footer_shape1 = isset( $cyarb_opt['cyarb_footer_shape1']['url']) ? $cyarb_opt['cyarb_footer_shape1']['url'] : '';
$footer_shape2 = isset( $cyarb_opt['cyarb_footer_shape2']['url']) ? $cyarb_opt['cyarb_footer_shape2']['url'] : '';
?>
<!-- Start CTA Area -->
<?php if( $cta_enable == '1' ) : ?>
<div class="cta-area pb-100">
<div class="container">
<div class="cta-inner">
<?php if(isset( $cyarb_opt['cyarb_cta_text'] ) && $cyarb_opt['cyarb_cta_text'] !='') : ?>
<h2><?php echo esc_html( $cyarb_opt['cyarb_cta_text'] ); ?></h2>
<?php else: ?>
<h2><?php esc_html_e('Let’s Talk About How Can Help You Securely Advance', 'cyarb'); ?></h2>
<?php endif; ?>
<?php if( $button_text == true ): ?>
<a class="default-btn" target="_blank" href="<?php echo esc_url( $btn_link ) ?>">
<span><?php echo esc_html( $button_text ); ?></span>
</a>
<?php else: ?>
<a class="default-btn" target="_blank" href="#">
<span><?php esc_html_e('Get A Free Quote', 'cyarb'); ?></span>
</a>
<?php endif; ?>
<?php if( $cta_shape == 1 ) : ?>
<div class="shape9"><img src="<?php echo esc_url(get_template_directory_uri() .'/assets/img/shape/shape9.png' ); ?>" alt="<?php the_title_attribute(); ?>"></div>
<div class="shape10"><img src="<?php echo esc_url(get_template_directory_uri() .'/assets/img/shape/shape10.png' ); ?>" alt="<?php the_title_attribute(); ?>"></div>
<?php endif; ?>
</div>
</div>
</div>
<?php endif; ?>
<!-- Start Partner Area -->
<?php if( $partner_logo == '1' ) : ?>
<?php if (class_exists( 'ACF') && get_field('partner_image') && class_exists( 'ACF') && get_field('partner_title')){ ?>
<div class="partner-area pb-100">
<div class="container">
<div class="row align-items-center">
<div class="col-lg-3 col-md-12">
<?php if (class_exists( 'ACF') && get_field('partner_title')){ ?>
<div class="partner-title">
<h4><?php echo esc_html( get_field( 'partner_title' ) ); ?></h4>
</div>
<?php } ?>
</div>
<div class="col-lg-9 col-md-12">
<div class="partners-list align-items-center">
<div class="partner-carousel owl-carousel owl-theme">
<?php
// check for rows (parent repeater)
if( have_rows('partner_image') ):
// loop through rows (sub repeater)
while( have_rows('partner_image') ): the_row(); ?>
<div class="partner-item">
<a href="<?php echo esc_url( get_sub_field('partner_logo_url') ); ?>" target="_blank" class="d-inline-block">
<img src="<?php echo esc_url(get_sub_field('partner_logos') ); ?>" alt="<?php the_title_attribute(); ?>">
</a>
</div>
<?php endwhile; ?>
<?php endif; //if( get_sub_field('partner_image') ): ?>
</div>
</div>
</div>
</div>
</div>
</div>
<?php } ?>
<?php endif; ?>
<!-- End Partner Area -->
<footer class="footer-area <?php echo esc_attr( $footer_padding ); ?>" style="background-image:url(<?php echo esc_url( $banner_bg ); ?>);">
<div class="container">
<div class="row justify-content-center">
<?php if ( is_active_sidebar( 'cyarb_footer_one' ) ) { ?>
<?php if($theme_default_opt == true ) : ?>
<div class="col-lg-3 col-md-6 col-sm-6">
<?php else: ?>
<div class="<?php echo esc_attr( $col_cls ); ?>">
<?php endif; ?>
<?php dynamic_sidebar('cyarb_footer_one'); ?>
</div>
<?php } ?>
<?php if ( is_active_sidebar( 'cyarb_footer_two' ) ) { ?>
<?php if($theme_default_opt == true ) : ?>
<div class="col-lg-3 col-md-6 col-sm-6">
<?php else: ?>
<div class="<?php echo esc_attr( $col_cls ); ?>">
<?php endif; ?>
<?php dynamic_sidebar('cyarb_footer_two'); ?>
</div>
<?php } ?>
<?php if ( is_active_sidebar( 'cyarb_footer_three' ) ) { ?>
<?php if($theme_default_opt == true ) : ?>
<div class="col-lg-3 col-md-6 col-sm-6">
<?php else: ?>
<div class="<?php echo esc_attr( $col_cls ); ?>">
<?php endif; ?>
<?php dynamic_sidebar('cyarb_footer_three'); ?>
</div>
<?php } ?>
<?php if ( is_active_sidebar( 'cyarb_footer_four' ) ) { ?>
<?php if($theme_default_opt == true ) : ?>
<div class="col-lg-3 col-md-6 col-sm-6">
<?php else: ?>
<div class="<?php echo esc_attr( $col_cls ); ?>">
<?php endif; ?>
<?php dynamic_sidebar('cyarb_footer_four'); ?>
</div>
<?php } ?>
</div>
<div class="copyright-area <?php echo esc_attr( $footer_padding ); ?>">
<?php if(isset( $cyarb_opt['cyarb_footer_copyright_text'] ) && $cyarb_opt['cyarb_footer_copyright_text'] !='') { ?>
<p><?php echo wp_kses_post( $cyarb_opt['cyarb_footer_copyright_text'] ) ; ?> </p>
<?php } else { ?>
<p> <?php echo esc_html__( '©Copyright 2021 All Rights Reserved.','cyarb' ) ; ?> </p>
<?php } ?>
</div>
</div>
<?php if( $footer_shape == 1 && $footer_shape1 != '' ) : ?>
<div class="shape4"><img src="<?php echo esc_url( $footer_shape1 ); ?>" alt="<?php the_title_attribute(); ?>"></div>
<?php endif; ?>
</footer>