PluginProbe ʕ •ᴥ•ʔ
Superb Addons: Blocks, Patterns, Pre-built Pages, Sliders, Popups, Free Forms, Animations & More / 4.0.4
Superb Addons: Blocks, Patterns, Pre-built Pages, Sliders, Popups, Free Forms, Animations & More v4.0.4
4.0.6 4.0.5 4.0.4 4.0.3 4.0.2 4.0.1 4.0.0 trunk 1.0.0 2.0.0 2.0.1 2.0.2 2.0.3 3.0 3.0.1 3.0.2 3.0.5 3.0.6 3.0.7 3.0.8 3.0.9 3.1.0 3.1.2 3.1.3 3.2.0 3.2.1 3.2.2 3.2.4 3.2.5 3.2.7 3.2.8 3.2.9 3.3.0 3.3.1 3.3.2 3.4.0 3.4.1 3.4.2 3.4.5 3.4.6 3.5.0 3.5.1 3.5.2 3.5.3 3.5.4 3.5.6 3.5.7 3.5.8 3.5.9 3.6.0 3.6.1 3.6.2 3.7.0 3.7.1
superb-blocks / src / class-plugin.php
superb-blocks / src Last commit date
admin 2 weeks ago commerce 2 weeks ago components 2 weeks ago data 2 weeks ago elementor 2 weeks ago gutenberg 2 weeks ago library 2 weeks ago tours 2 weeks ago class-config.php 2 weeks ago class-plugin.php 2 weeks ago
class-plugin.php
75 lines
1 <?php
2
3 namespace SuperbAddons;
4
5 defined('ABSPATH') || exit();
6
7 use Exception;
8 use SuperbAddons\Elementor\Controllers\ElementorController;
9 use SuperbAddons\Admin\Controllers\DashboardController;
10 use SuperbAddons\Admin\Controllers\ReviewController;
11 use SuperbAddons\Admin\Controllers\Wizard\WizardController;
12 use SuperbAddons\Admin\Controllers\Wizard\WizardRestorationPointController;
13 use SuperbAddons\Data\Controllers\CSSController;
14 use SuperbAddons\Data\Controllers\LogController;
15 use SuperbAddons\Data\Controllers\RestController;
16 use SuperbAddons\Gutenberg\Controllers\GutenbergController;
17 use SuperbAddons\Library\Controllers\FavoritesController;
18 use SuperbAddons\Library\Controllers\LibraryRequestController;
19 use SuperbAddons\Admin\Controllers\LicenseResolveController;
20 use SuperbAddons\Admin\Controllers\RewriteCheckController;
21 use SuperbAddons\Tours\Controllers\TourController;
22
23 class SuperbAddonsPlugin
24 {
25 private static $instance;
26
27 public static function GetInstance()
28 {
29 if (!isset(self::$instance)) {
30 self::$instance = new self();
31 }
32 return self::$instance;
33 }
34
35 public function __construct()
36 {
37 register_activation_hook(SUPERBADDONS_BASE_PATH, array($this, 'ActivationHookFunction'));
38 register_deactivation_hook(SUPERBADDONS_BASE_PATH, array($this, 'DeactivationHookFunction'));
39 RewriteCheckController::Initialize();
40 LicenseResolveController::Initialize();
41 new DashboardController();
42 new ReviewController();
43 new GutenbergController();
44 new ElementorController();
45 new LibraryRequestController();
46 new FavoritesController();
47 new TourController();
48 new CSSController();
49 LogController::AddCronAction();
50 RestController::RegisterRoutes();
51 }
52
53 public function ActivationHookFunction()
54 {
55 try {
56 add_option('superbaddons_pre_activation', time(), "", false);
57 WizardController::MaybeSetWizardRecommenderTransient();
58 RewriteCheckController::ScheduleCheck();
59 } catch (Exception $e) {
60 LogController::HandleException($e);
61 }
62 }
63
64 public function DeactivationHookFunction()
65 {
66 try {
67 LogController::MaybeUnsubscribeCron();
68 WizardRestorationPointController::MaybeUnsubscribeCron();
69 } catch (Exception $e) {
70 // Make sure deactivation succeeds
71 LogController::HandleException($e);
72 }
73 }
74 }
75