<?php
/**
 * Jalpi Page Builder Theme Builder — full-page template.
 *
 * WordPress serves this file via the `template_include` filter whenever a
 * Jalpi theme template is matched for the current request. It takes over
 * completely from the active theme, while still respecting all wp_head()
 * and wp_footer() enqueued scripts and styles (SEO plugins, analytics, etc.).
 */
if ( ! defined( 'ABSPATH' ) ) exit;

$jalpi_tb = Jalpi_Theme_Builder::instance();
?><!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>">
<meta name="viewport" content="width=device-width, initial-scale=1">
<?php wp_head(); ?>
</head>
<body <?php body_class( 'jalpi-theme-page' ); ?>>
<?php
    wp_body_open();
    echo wp_kses( $jalpi_tb->render_active_templates(), Jalpi_Renderer::allowed_html() );
    wp_footer();
?>
</body>
</html>
