<?php
/**
 * 404 page file
 *
 * @package    WordPress
 * @subpackage inventive
 * @author     Theme Kalia <admin@themekalia.com>
 * @version    1.0
 */
 
 $allowed_html = wp_kses_allowed_html( 'post' );

$bg_img   = $options->get( 'bg_image' );
$bg_img   = inventive_set( $bg_img, 'url', INVENTIVE_URI . '/assets/images/resource/erorr.png' );

$icon_image   = $options->get( 'icon_image' );
$icon_image   = inventive_set( $icon_image, 'url', INVENTIVE_URI . '/assets/images/shape/oops-bg.png' );

?>
<?php get_header('coming-soon');
$data = \INVENTIVE\Includes\Classes\Common::instance()->data( '404' )->get();
$options = inventive_WSH()->option();

if ( class_exists( '\Elementor\Plugin' ) AND $data->get( 'tpl-type' ) == 'e' AND $data->get( 'tpl-elementor' ) ) {
	echo Elementor\Plugin::instance()->frontend->get_builder_content_for_display( $data->get( 'tpl-elementor' ) );
} else {
?>
    
<section class="erorr_page">
	
    <div class="erorr_content_box text-center p_relative">
        <div class="erorr_text mb_30">
            <?php if( $bg_img ){?><img src="<?php echo esc_url($bg_img); ?>" alt="<?php esc_attr_e('Awesome Image', 'inventive'); ?>"><?php };?>
            <div class="shape" <?php if( $icon_image ){?>style="background-image: url('<?php echo esc_url($icon_image); ?>');"<?php };?>>Oops!</div>
        </div>
        <div class="sec_title_wrap text-center">
            <h2 class="sec_title">
                <?php if( $options->get( '404_page_title' ) ):?>
                    <?php echo wp_kses( $options->get( '404_page_title' ), true );?>
                <?php else:?>
                    <?php esc_html_e( 'Something Went Wrong, Try Later.', 'inventive' );?>
                <?php endif;?>
            </h2>
            <p class="sec_desc">
                <?php if( $options->get( '404_page_text' ) ):?>
                    <?php echo wp_kses( $options->get( '404_page_text' ), true );?>
                <?php else:?>
                    <?php esc_html_e( 'Try refining your search or use the navigation below to <br>return to the main home page.', 'inventive' );?>
                <?php endif;?>                    
            </p>
            <?php if ( $options->get( 'back_home_btn', true ) ) : ?>
            <div class="link-btn">
                <a href="<?php echo esc_url( home_url( '/' ) ); ?>">
                    <?php 
                        if( $options->get( 'back_home_btn_label' ) ){
                            echo wp_kses( $options->get( 'back_home_btn_label' ), true );
                        }else{
                            esc_html_e( 'Back to Home Page', 'inventive' );
                        }
                    ?>
                </a>
            </div>
            <?php endif; ?>
        </div>
    </div>
</section> 
        
<?php
}
get_footer('coming-soon');
