| 1 |
<?php |
| 2 |
/** |
| 3 |
* Template Name: Sellkit Canvas |
| 4 |
* |
| 5 |
* @package Sellkit |
| 6 |
*/ |
| 7 |
|
| 8 |
// Exit if accessed directly. |
| 9 |
if ( ! defined( 'ABSPATH' ) ) { |
| 10 |
exit; |
| 11 |
} |
| 12 |
|
| 13 |
// phpcs:disable WordPress.NamingConventions.PrefixAllGlobals -- Sellkit canvas template scope. |
| 14 |
|
| 15 |
use Elementor\Plugin as Elementor; |
| 16 |
|
| 17 |
$is_global_checkout = apply_filters( 'sellkit_global_checkout_activated', false ); |
| 18 |
$header_template = apply_filters( 'sellkit_global_checkout_header_applied_id', 0 ); |
| 19 |
$footer_template = apply_filters( 'sellkit_global_checkout_footer_applied_id', 0 ); |
| 20 |
|
| 21 |
if ( $is_global_checkout ) { |
| 22 |
remove_action( 'jupiterx_main_content_before_markup', 'jupiterx_wc_add_steps' ); |
| 23 |
} |
| 24 |
?> |
| 25 |
|
| 26 |
<html <?php language_attributes(); ?> class="no-js"> |
| 27 |
<head> |
| 28 |
<meta charset="<?php bloginfo( 'charset' ); ?>"> |
| 29 |
<meta name="viewport" content="width=device-width, initial-scale=1"> |
| 30 |
<link rel="profile" href="http://gmpg.org/xfn/11"> |
| 31 |
<?php wp_head(); ?> |
| 32 |
</head> |
| 33 |
|
| 34 |
<body <?php body_class( 'sellkit' ); ?>> |
| 35 |
|
| 36 |
<?php wp_body_open(); ?> |
| 37 |
<?php |
| 38 |
if ( $is_global_checkout && 'default' === $header_template ) { |
| 39 |
get_header(); |
| 40 |
} |
| 41 |
|
| 42 |
if ( $is_global_checkout && intval( $header_template ) > 0 ) { |
| 43 |
$content = Elementor::instance()->frontend->get_builder_content_for_display( intval( $header_template ), true ); |
| 44 |
echo do_shortcode( $content ); |
| 45 |
} |
| 46 |
?> |
| 47 |
<div class="sellkit-container" > |
| 48 |
|
| 49 |
<?php |
| 50 |
while ( have_posts() ) : |
| 51 |
|
| 52 |
the_post(); |
| 53 |
the_content(); |
| 54 |
|
| 55 |
endwhile; |
| 56 |
?> |
| 57 |
</div> |
| 58 |
<?php |
| 59 |
if ( $is_global_checkout && 'default' === $footer_template ) { |
| 60 |
get_footer(); |
| 61 |
} |
| 62 |
|
| 63 |
if ( $is_global_checkout && intval( $footer_template ) > 0 ) { |
| 64 |
$content = Elementor::instance()->frontend->get_builder_content_for_display( intval( $footer_template ), true ); |
| 65 |
echo do_shortcode( $content ); |
| 66 |
} |
| 67 |
?> |
| 68 |
<?php wp_footer(); ?> |
| 69 |
</body> |
| 70 |
</html> |
| 71 |
|