Total Complexity | 8 |
Total Lines | 36 |
Duplicated Lines | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 2 |
1 | <?php |
||
7 | class Hooks extends IntegrationHooks |
||
8 | { |
||
9 | public function run(): void |
||
10 | { |
||
11 | if (!$this->isInstalled()) { |
||
12 | return; |
||
13 | } |
||
14 | if (!$this->isVersionSupported()) { |
||
15 | $this->notify('Fusion Builder'); |
||
16 | return; |
||
17 | } |
||
18 | $this->hook(Controller::class, [ |
||
19 | ['enqueueBuilderStyles', 'fusion_builder_enqueue_live_scripts'], |
||
20 | ['filterButtonClass', 'site-reviews/defaults/style-classes/defaults'], |
||
21 | ['filterPublicInlineScript', 'site-reviews/enqueue/public/inline-script/after'], |
||
22 | ['onActivated', 'site-reviews/activated'], |
||
23 | ['registerFusionElements', 'fusion_builder_before_init'], |
||
24 | ]); |
||
25 | } |
||
26 | |||
27 | protected function isInstalled(): bool |
||
30 | } |
||
31 | |||
32 | protected function supportedVersion(): string |
||
35 | } |
||
36 | |||
37 | protected function version(): string |
||
43 | } |
||
44 | } |
||
45 |