PluginProbe
Templately – Elementor & Gutenberg Template Library: 6500+ Free & Pro Ready Templates And Cloud! / 3.0.6
Templately – Elementor & Gutenberg Template Library: 6500+ Free & Pro Ready Templates And Cloud! v3.0.6
3.7.5 3.7.4 3.7.3 3.7.2 1-final 3.7.1 3.7.0 3.6.8 3.6.7 3.6.6 3.6.5 3.6.4 3.6.3 3.6.2 3.6.1 3.0.3 3.0.4 3.0.5 3.0.6 3.0.7 3.0.8 3.0.9 3.1.0 3.1.1 3.1.10 All 111 releases
templately / includes / Builder / Types / ThemeTemplate.php

ThemeTemplate.php in Templately – Elementor & Gutenberg Template Library: 6500+ Free & Pro Ready Templates And Cloud! 3.0.6, at includes/Builder/Types/ThemeTemplate.php

38 lines 1.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace Templately\Builder\Types;
4
5 use EbStyleHandler;
6 use Elementor\Plugin;
7
8 abstract class ThemeTemplate extends BaseTemplate {
9
10 public function get_location() {
11 return $this->get_property( 'location' );
12 }
13
14 public function print_content() {
15 if ( $this->is_elementor_template() && class_exists( 'Elementor\Plugin' ) ) {
16 $plugin = Plugin::$instance;
17
18 if ( $plugin->preview->is_preview_mode( $this->get_main_id() ) ) {
19 // PHPCS - the method builder_wrapper is safe.
20 echo $plugin->preview->builder_wrapper( '' ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
21 } else {
22 // PHPCS - the method get_content is safe.
23 echo $this->get_content(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
24 }
25
26
27 return;
28 }
29 $content = $this->get_content();
30 echo do_blocks( $content ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
31
32 if(function_exists('wp_script_modules')){
33 add_action( 'wp_footer', array( wp_script_modules(), 'print_import_map' ) );
34 add_action( 'wp_footer', array( wp_script_modules(), 'print_enqueued_script_modules' ) );
35 add_action( 'wp_footer', array( wp_script_modules(), 'print_script_module_preloads' ) );
36 }
37 }
38 }