PluginProbe
Easy Elements for Elementor – Addons & Website Templates / 1.2.1
Easy Elements for Elementor – Addons & Website Templates v1.2.1
1.5.3 1.5.2 1.5.1 1.5.0 1.4.9 1.4.6 1.4.7 1.4.8 1.4.5 1.4.4 1.4.3 1.2.7 1.2.8 1.2.9 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 1.3.6 1.3.7 1.3.8 1.3.9 1.4.0 All 47 releases
easy-elements / inc / class-loader.php

class-loader.php in Easy Elements for Elementor – Addons & Website Templates 1.2.1, at inc/class-loader.php

76 lines 2.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 if ( ! defined( 'ABSPATH' ) ) exit;
3
4 class Easy_Elements_Loader {
5 private static $instance = null;
6 /**
7 * Get instance (singleton)
8 */
9 public static function instance() {
10 if ( self::$instance === null ) {
11 self::$instance = new self();
12 }
13 return self::$instance;
14 }
15 /**
16 * Constructor (private to prevent multiple instantiation)
17 */
18 private function __construct() {
19 $this->includes();
20 }
21 /**
22 * Include necessary files
23 */
24 private function includes() {
25
26 $includes = [
27 'helpers' => [
28 'inc/class-assets.php',
29 'inc/helper.php',
30 'inc/canvas-content.php',
31 'inc/extension/class-easy-promo-helper.php',
32 'inc/extension/class-wrapper-link.php',
33 'inc/extension/custom-css/easy-custom-css.php',
34 'inc/extension/global-jarallax/global-jarallax.php',
35 'inc/jaralax-control.php',
36 'inc/custom-code/easy-custom-code.php',
37 'easy-template-library/class-easy-elements-template-library.php',
38 'inc/extension/duplicator/easy-duplicator.php',
39 'inc/extension/pagepostexport/pagepostexport.php',
40 'inc/extension/visibility-control/class-easy-visibility-module.php',
41 'inc/extension/live-copy-paste/live-copy-paste.php',
42 'inc/extension/extension-hook/class-extension-hook.php',
43 ],
44 'admin' => [
45 'admin/settings.php',
46 ],
47 'frontend' => [
48 'base.php',
49 'templates/theme-builder/easyel-builder-frontend.php',
50 ],
51 'addons' => [
52 'header-footer-builder/classes/easy-header-footer.php',
53 ],
54 'cpt' => [
55 'templates/theme-builder/easy-theme-builder-post-type.php',
56 ],
57 ];
58
59 foreach ( $includes as $group ) {
60 foreach ( $group as $file ) {
61 $this->easyelements_include_file( $file );
62 }
63 }
64 }
65
66 public function easyelements_include_file( $file ) {
67
68 $filepath = EASYELEMENTS_DIR_PATH . $file;
69 if ( file_exists( $filepath ) ) {
70 require_once $filepath;
71 }
72 }
73 }
74
75 // Initialize
76 Easy_Elements_Loader::instance();