<?php
/**
 * Custom Header Funtions
 *
 * @package Matrimony
 */
if ( ! function_exists( 'matrimony_top_header_callback' ) ) :
    /**
     *  Banner Image, Title and Sub Title
     */
    function matrimony_top_header_callback(){
        $top_header_option = get_theme_mod('matrimonial_header_option', 0 );
        $banner_title = get_theme_mod( 'matrimony_header_title', '' );
        $banner_subtitle_title = get_theme_mod( 'matrimony_header_sub_title', '' );
        $image = get_theme_mod('matrimony_header_banner_image','' );
        if( 0 == $top_header_option ) {
            return;
        } ?>
            <section class="featured-slider layout-1">
                <div class="featured-banner">
                    <div class="featured-item">
                        <?php if( !empty( $image) ) { ?>
                            <figure>
                               <img src="<?php echo esc_url($image);?>" />
                            </figure>
                        <?php } ?>
                        <div class="featured-item-contain">
                            <?php if( !empty( $banner_title ) ) { ?>
                                <h3 class="entry-title"><?php echo esc_html($banner_title);?></h3>
                            <?php  } ?>
                            <?php if( !empty( $banner_subtitle_title ) ) { ?>
                            <div class="entry-contain">
                                <p><?php echo esc_html($banner_subtitle_title);?></p>
                            </div>
                            <?php  } ?>
                            <?php  if(!empty($banner_img)){ ?>  
                                <div class="header-img-wrap">
                                    <img src="<?php echo esc_url($banner_img); ?>" />
                                </div>
                             <?php } ?>
                        </div>
                    </div><!--featured-item-->
                </div>
                <a class="scroll-down" href="javascript:void(0)"></a>
            </section><!-- featured-slider ends here -->
    <?php }
endif; 
add_action('matrimony_top_header_callback_action','matrimony_top_header_callback');   
