canvas.php
53 lines
| 1 | <?php |
| 2 | |
| 3 | use Elementor\Utils; |
| 4 | |
| 5 | if ( ! defined( 'ABSPATH' ) ) { |
| 6 | exit; // Exit if accessed directly. |
| 7 | } |
| 8 | |
| 9 | \Elementor\Plugin::$instance->frontend->add_body_class( 'elementor-template-canvas' ); |
| 10 | |
| 11 | ?> |
| 12 | <!DOCTYPE html> |
| 13 | <html <?php language_attributes(); ?>> |
| 14 | <head> |
| 15 | <meta charset="<?php bloginfo( 'charset' ); ?>"> |
| 16 | <?php if ( ! current_theme_supports( 'title-tag' ) ) : ?> |
| 17 | <title><?php echo wp_get_document_title(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></title> |
| 18 | <?php endif; ?> |
| 19 | <?php wp_head(); ?> |
| 20 | <?php |
| 21 | |
| 22 | // Keep the following line after `wp_head()` call, to ensure it's not overridden by another templates. |
| 23 | Utils::print_unescaped_internal_string( Utils::get_meta_viewport( 'canvas' ) ); |
| 24 | ?> |
| 25 | </head> |
| 26 | <body <?php body_class(); ?>> |
| 27 | <?php |
| 28 | Elementor\Modules\PageTemplates\Module::body_open(); |
| 29 | /** |
| 30 | * Before canvas page template content. |
| 31 | * |
| 32 | * Fires before the content of Elementor canvas page template. |
| 33 | * |
| 34 | * @since 1.0.0 |
| 35 | */ |
| 36 | do_action( 'elementor/page_templates/canvas/before_content' ); |
| 37 | |
| 38 | \Elementor\Plugin::$instance->modules_manager->get_modules( 'page-templates' )->print_content(); |
| 39 | |
| 40 | /** |
| 41 | * After canvas page template content. |
| 42 | * |
| 43 | * Fires after the content of Elementor canvas page template. |
| 44 | * |
| 45 | * @since 1.0.0 |
| 46 | */ |
| 47 | do_action( 'elementor/page_templates/canvas/after_content' ); |
| 48 | |
| 49 | wp_footer(); |
| 50 | ?> |
| 51 | </body> |
| 52 | </html> |
| 53 |