PluginProbe
The GDPR Framework By Data443 / 2.1.0
The GDPR Framework By Data443 v2.1.0
2.5.0 2.4.0 trunk 1.0.0 1.0.1 1.0.10 1.0.11 1.0.12 1.0.13 1.0.14 1.0.3 1.0.33 1.0.34 1.0.35 1.0.36 1.0.37 1.0.39 1.0.4 1.0.40 1.0.41 1.0.42 1.0.43 1.0.44 1.0.45 1.0.46 All 41 releases
gdpr-framework / src / Installer / Steps / Integrations.php

Integrations.php in The GDPR Framework By Data443 2.1.0, at src/Installer/Steps/Integrations.php

52 lines 1.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace Codelight\GDPR\Installer\Steps;
4
5 use Codelight\GDPR\Installer\InstallerStep;
6 use Codelight\GDPR\Installer\InstallerStepInterface;
7
8 class Integrations extends InstallerStep implements InstallerStepInterface
9 {
10 protected $slug = 'integrations';
11
12 protected $type = 'wizard';
13
14 protected $template = 'installer/steps/integrations';
15
16 protected $activeSteps = 4;
17
18 protected function renderContent()
19 {
20 global $gdpr;
21 $enableThemeCompatibility = $gdpr->Options->get('enable_theme_compatibility');
22 $currentTheme = gdpr('themes')->getCurrentThemeName();
23 $isThemeSupported = gdpr('themes')->isCurrentThemeSupported();
24
25 $hasWooCommerce = false;
26 $hasEDD = false;
27 $hasSendGrid = class_exists('\Sendgrid_Tools');
28
29 echo gdpr('view')->render(
30 $this->template,
31 compact(
32 'enableThemeCompatibility',
33 'hasEDD',
34 'hasWooCommerce',
35 'currentTheme',
36 'isThemeSupported',
37 'hasSendGrid'
38 )
39 );
40 }
41
42 public function submit()
43 {
44 global $gdpr;
45 if (isset($_POST['gdpr_enable_theme_compatibility']) && 'yes' === $_POST['gdpr_enable_theme_compatibility']) {
46 $gdpr->Options->set('enable_theme_compatibility', true);
47 } else {
48 $gdpr->Options->set('enable_theme_compatibility', false);
49 }
50 }
51 }
52