PluginProbe
Templately – Elementor & Gutenberg Template Library: 6500+ Free & Pro Ready Templates And Cloud! / 3.7.1
Templately – Elementor & Gutenberg Template Library: 6500+ Free & Pro Ready Templates And Cloud! v3.7.1
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.7.1, at includes/Builder/Types/ThemeTemplate.php

37 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 Elementor\Plugin;
6
7 abstract class ThemeTemplate extends BaseTemplate {
8
9 public function get_location() {
10 return $this->get_property( 'location' );
11 }
12
13 public function print_content() {
14 if ( $this->is_elementor_template() && class_exists( 'Elementor\Plugin' ) ) {
15 $plugin = Plugin::$instance;
16
17 if ( $plugin->preview->is_preview_mode( $this->get_main_id() ) ) {
18 // PHPCS - the method builder_wrapper is safe.
19 echo $plugin->preview->builder_wrapper( '' ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
20 } else {
21 // PHPCS - the method get_content is safe.
22 echo $this->get_content(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
23 }
24
25
26 return;
27 }
28 $content = $this->get_content();
29 echo do_blocks( $content ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
30
31 if(function_exists('wp_script_modules')){
32 add_action( 'wp_footer', array( wp_script_modules(), 'print_import_map' ) );
33 add_action( 'wp_footer', array( wp_script_modules(), 'print_enqueued_script_modules' ) );
34 add_action( 'wp_footer', array( wp_script_modules(), 'print_script_module_preloads' ) );
35 }
36 }
37 }