| 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 Consent extends InstallerStep implements InstallerStepInterface |
| 9 |
{ |
| 10 |
protected $slug = 'consent'; |
| 11 |
|
| 12 |
protected $type = 'wizard'; |
| 13 |
|
| 14 |
protected $template = 'installer/steps/consent'; |
| 15 |
|
| 16 |
protected $activeSteps = 3; |
| 17 |
|
| 18 |
protected function renderContent() |
| 19 |
{ |
| 20 |
global $gdpr; |
| 21 |
$isRegistrationOpen = get_option('users_can_register'); |
| 22 |
$isCommentsEnabled = class_exists('Disable_Comments') ? false : true; |
| 23 |
$privacyToolsPageUrl = get_permalink($gdpr->Options->get('tools_page')); |
| 24 |
$hasGravityForms = class_exists('\GFForms'); |
| 25 |
$hasCF7 = class_exists('\WPCF7'); |
| 26 |
$hasFrm = class_exists('\FrmHooksController'); |
| 27 |
$hasNinjaForms = class_exists('\Ninja_Forms'); |
| 28 |
echo gdpr('view')->render( |
| 29 |
$this->template, |
| 30 |
compact('isRegistrationOpen', 'isCommentsEnabled', 'privacyToolsPageUrl', 'hasGravityForms', 'hasCF7', 'hasFrm', 'hasNinjaForms') |
| 31 |
); |
| 32 |
} |
| 33 |
} |
| 34 |
|