PluginProbe
ElementsKit Elementor Addons – Advanced Widgets & Templates Addons for Elementor / 4.0.4
ElementsKit Elementor Addons – Advanced Widgets & Templates Addons for Elementor v4.0.4
4.0.4 4.0.3 4.0.2 4.0.1 4.0.0 3.10.02 3.10.01 3.9.10 3.9.9 3.9.8 3.9.7 3.9.5 3.9.6 3.9.3 2.1.0 2.1.1 2.1.2 2.1.3 2.1.4 2.1.5 2.1.6 2.1.7 2.2.0 2.2.1 2.2.2 All 183 releases
elementskit-lite / libs / template / loader.php
loader.php
48 lines 767 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 namespace ElementsKit_Lite\Libs\Template;
3
4 defined( 'ABSPATH' ) || exit;
5
6 require 'transformer.php';
7
8 class Loader {
9
10 private $transformer;
11
12 function __construct() {
13 $this->transformer = new Transformer();
14 }
15
16 public function replace_tags( $string, $prefix, $force_lower = false ) {
17 return preg_replace_callback(
18 '/\\{\\{([^{}]+)\}\\}/',
19 function( $matches ) use ( $force_lower, $prefix ) {
20
21 return $this->transformer->render( $matches[1], $prefix );
22 },
23 $string
24 );
25 }
26
27 private function tag_list() {
28 return array();
29 }
30
31
32
33
34 /**
35 * Get the instance.
36 */
37 private static $instance = null;
38
39 public static function instance() {
40 if ( self::$instance == null ) {
41 self::$instance = new self();
42 }
43
44 return self::$instance;
45 }
46
47 }
48