PluginProbe ʕ •ᴥ•ʔ
Essential Classy Addons for Elementor – 150+ Widgets, Templates & Performance Tools / 3.0.27
Essential Classy Addons for Elementor – 150+ Widgets, Templates & Performance Tools v3.0.27
3.0.59 trunk 1.0.0 1.0.1 1.0.2 1.0.3 1.0.4 1.0.5 2.0.0 2.0.1 2.0.2 2.0.3 2.0.4 3.0 3.0.1 3.0.10 3.0.11 3.0.12 3.0.13 3.0.14 3.0.15 3.0.16 3.0.18 3.0.2 3.0.20 3.0.21 3.0.22 3.0.23 3.0.24 3.0.25 3.0.26 3.0.27 3.0.28 3.0.29 3.0.3 3.0.30 3.0.31 3.0.32 3.0.33 3.0.34 3.0.35 3.0.36 3.0.37 3.0.38 3.0.39 3.0.4 3.0.40 3.0.41 3.0.42 3.0.43 3.0.44 3.0.45 3.0.46 3.0.47 3.0.48 3.0.49 3.0.5 3.0.50 3.0.51 3.0.52 3.0.53 3.0.54 3.0.55 3.0.56 3.0.57 3.0.58 3.0.6 3.0.7 3.0.8 3.0.9
essential-classy-addons-for-elementor / classes / builders / theme-template.php
essential-classy-addons-for-elementor / classes / builders Last commit date
singular-canvas.php 1 year ago singular-fullwidth.php 1 year ago theme-footer.php 1 year ago theme-header.php 1 year ago theme-template.php 1 year ago
theme-template.php
56 lines
1 <?php
2 defined('ABSPATH') || exit;
3
4 class Ecafe_Theme_Template {
5
6 function __construct() {
7
8 $headers = Ecafe_Condition_Rules::get_instance()->ec_get_location_type('header');
9 $footers = Ecafe_Condition_Rules::get_instance()->ec_get_location_type('footer');
10
11 if (!empty($headers)) {
12 add_action('get_header', [$this, 'get_header_render']);
13 }
14 if (!empty($footers)) {
15 add_action('get_footer', [$this, 'get_footer_render']);
16 }
17 }
18
19 public function get_header_render($temp_name) {
20
21 require( ECAFE_CLASSES_URL . 'builders/theme-header.php' );
22
23 $temp_name = (string) $temp_name;
24 $load_templates = [];
25 if ($temp_name !== ''){
26 $load_templates[] = "header-{$temp_name}.php";
27 }
28
29 $load_templates[] = 'header.php';
30
31 remove_all_actions('wp_head');
32 ob_start();
33
34 locate_template($load_templates, true);
35 ob_get_clean();
36 }
37
38 public function get_footer_render($temp_name) {
39
40 require( ECAFE_CLASSES_URL . 'builders/theme-footer.php' );
41 $temp_name = (string) $temp_name;
42 $load_templates = [];
43 if($temp_name !== ''){
44 $load_templates[] = "footer-{$temp_name}.php";
45 }
46
47 $load_templates[] = 'footer.php';
48
49 ob_start();
50
51 locate_template($load_templates, true);
52 ob_get_clean();
53 }
54
55 }
56