<?php
/**
 * 404 page file
 *
 * @package    WordPress
 * @subpackage Roonix
 * @author     Template Path <admin@template_path.com>
 * @version    1.0
 */

$allowed_html = wp_kses_allowed_html( 'post' );

?>
<?php get_header();
$data = \ROONIX\Includes\Classes\Common::instance()->data( '404' )->get();
$options = roonix_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 {
?>
<?php if ( class_exists( '\Elementor\Plugin' )):?>
	<?php do_action( 'roonix_banner', $data );?>
<?php else:?>

<section class="page-title" style="background-image: url(<?php echo esc_url( $data->get( 'banner' ) ); ?>)">
    <div class="auto-container">
        <h2><?php if( $data->get( 'title' ) ) echo wp_kses( $data->get( 'title' ), true ); else( the_title( '' ) ); ?></h2>
        <ul class="bread-crumb clearfix">
            <?php echo roonix_the_breadcrumb(); ?>
        </ul>
    </div>
    <!-- Scroll To Down -->
    <div class="scroll-to-down scroll-to-target" data-target=".services-page-section"><span class="flaticon-down-arrow-1"></span></div>
</section>

<?php endif;?>

    <!-- error-section -->
    <section class="error-section centred">
        <div class="auto-container">
            <div class="inner-box">
                <h1>
                    <?php 
                        if( $options->get( '404_page_title' ) ){
                            echo wp_kses( $options->get( '404_page_title' ), true );
                        }else{
                            esc_html_e( '404', 'roonix' );
                        }
                    ?>
                </h1>
                <h2>
                    <?php 
                        if( $options->get( '404_page_text' ) ){
                            echo wp_kses( $options->get( '404_page_text' ), true );
                        }else{
                            esc_html_e( 'Oops... The Page you are looking for could not be found. ', 'roonix' );
                        }
                    ?>
                </h2>
                <?php if ( $options->get( 'back_home_btn', true ) ) : ?>
                <div class="btn-box">
                    <a href="<?php echo esc_url( home_url( '/' ) ); ?>" class="theme-btn btn-style-two clearfix">
                        <span class="btn-wrap">
                            <?php 
                                if( $options->get( 'back_home_btn_label' ) ){
                                    echo wp_kses( $options->get( 'back_home_btn_label' ), true );
                                }else{
                                    esc_html_e( 'Go To Home', 'roonix' );
                                }
                            ?>
                        </span>
                        
                    </a>
                </div>
                <?php endif; ?>
            </div>
        </div>
    </section>
    <!-- error-section end -->
	
        
<?php
}
get_footer(); ?>
