<?php
// Exit if accessed directly
if (!defined('ABSPATH')) {
    exit;
}

//Dina Header Codes
add_action('wp_body_open', 'dina_header_codes');
function dina_header_codes() {
    global $di_data;

    if ($di_data['show_page_loading']) { ?>

        <div class="se-pre-con"></div>

    <?php }

    if($di_data['show_msg']) { ?>
        <!-- Header Massage Div -->
            <?php if($di_data['show_img_msg']) { ?>
                <aside class="head-img-msg-con">
                    <a href="<?php echo $di_data['img_msg_link']; ?>" class="head-img-msg" target="_blank" style="background-image: url(<?php echo $di_data['img_msg_image']['url']; ?>)" title="<?php echo $di_data['img_msg_title']; ?>"></a>
                </aside>
            <?php } else { ?>
                <div class="container-fluid head-msg">
                    <div class="container">
                        <div class="row">
                            <div class="col-12 col-md-10 msg-text">
                                <i aria-hidden="true" class="fal <?php echo $di_data['msg_icon']; ?> msg-icon"></i>
                                <span>
                                    <?php echo $di_data['site_msg']; ?>
                                </span>
                            </div>
                            <?php if($di_data['msg_btn']) { ?>
                            <div class="col-12 col-md-2 msg-btn-con">
                                <a class="btn <?php echo $di_data['msg_btn_color']; ?> msg-btn" href="<?php echo $di_data['msg_btn_link']; ?>" title="<?php echo $di_data['msg_btn_text']; ?>">
                                    <?php echo $di_data['msg_btn_text']; ?>
                                    <i class="fal fa-arrow-left" aria-hidden="true"></i>
                                </a>
                            </div>
                            <?php } ?>
                        </div>
                    </div>
                    <?php if($di_data['user_close']) { ?>
                    <i class="fal fa-times msg-close" aria-hidden="true"></i>
                    <?php } ?>
                </div>
            <?php } ?>
        <!-- Header Massage Div -->
    <?php }

}