PluginProbe ʕ •ᴥ•ʔ
ECS – Ele Custom Skin for Elementor / 4.3.6
ECS – Ele Custom Skin for Elementor v4.3.6
4.3.6 4.3.5 4.3.4 4.3.3 4.3.2 4.3.1 4.3.0 4.2.0 4.1.11 4.1.10 4.1.9 4.1.8 4.1.6 4.1.7 4.1.5 4.1.4 4.1.1 4.1.2 trunk 1.0.0 1.0.1 1.0.9 1.1.3 1.1.4 1.1.5 1.2.0 1.2.1 1.2.4 1.2.5 1.3.10 1.3.11 1.3.3 1.3.4 1.3.6 1.3.7 1.3.9 1.4.0 2.0.2 2.1.0 2.2.0 2.2.1 2.2.2 3.0.0 3.1.0 3.1.1 3.1.2 3.1.3 3.1.4 3.1.5 3.1.6 3.1.7 4.1.0
ele-custom-skin / includes / class-ecs-core.php
ele-custom-skin / includes Last commit date
admin-bar-menu.php 3 years ago ajax-pagination.php 2 years ago class-ecs-core.php 2 months ago class-ecs-module-base.php 1 month ago class-ecs-modules-manager.php 2 months ago dynamic-style.php 3 years ago ecs-dependencies.php 6 years ago ecs-notices.php 6 years ago enqueue-styles.php 2 years ago pro-features.php 2 months ago pro-preview.php 6 years ago
class-ecs-core.php
65 lines
1 <?php
2 /**
3 * ECS Core — main plugin singleton.
4 *
5 * Bootstraps the modules manager and the admin interface.
6 * Access anywhere with ECS_Core::instance().
7 */
8
9 if ( ! defined( 'ABSPATH' ) ) {
10 exit;
11 }
12
13 final class ECS_Core {
14
15 private static ?ECS_Core $instance = null;
16
17 private ECS_Modules_Manager $modules_manager;
18
19 public static function instance(): self {
20 if ( null === self::$instance ) {
21 self::$instance = new self();
22 }
23 return self::$instance;
24 }
25
26 private function __construct() {
27 $this->modules_manager = new ECS_Modules_Manager();
28
29 if ( is_admin() ) {
30 require_once ECS_PATH . 'admin/class-ecs-admin.php';
31 new ECS_Admin( $this->modules_manager );
32 }
33
34 add_action( 'init', [ $this, 'load_textdomain' ] );
35 add_action( 'elementor/elements/categories_registered', [ $this, 'register_widget_category' ] );
36 }
37
38 public function register_widget_category( $elements_manager ): void {
39 $elements_manager->add_category(
40 'ele-custom-skin',
41 [
42 'title' => __( 'ECS Toolkit', 'ele-custom-skin' ),
43 'icon' => 'fa fa-plug',
44 ]
45 );
46 }
47
48 public function load_textdomain(): void {
49 load_plugin_textdomain(
50 'ele-custom-skin',
51 false,
52 dirname( plugin_basename( ECS_FILE ) ) . '/languages'
53 );
54 }
55
56 public function modules(): ECS_Modules_Manager {
57 return $this->modules_manager;
58 }
59
60 private function __clone() {}
61 public function __wakeup() {
62 throw new \Exception( 'ECS_Core cannot be unserialized.' );
63 }
64 }
65