| 1 |
<?php |
| 2 |
|
| 3 |
namespace AgeGate\Integration; |
| 4 |
|
| 5 |
use AgeGate\Common\Settings; |
| 6 |
use AgeGate\Common\Integration; |
| 7 |
|
| 8 |
class Elementor extends Integration |
| 9 |
{ |
| 10 |
public function exists() |
| 11 |
{ |
| 12 |
return class_exists('\\Elementor\\Plugin'); |
| 13 |
} |
| 14 |
|
| 15 |
public function init() |
| 16 |
{ |
| 17 |
if ($this->exists()) { |
| 18 |
if (\Elementor\Plugin::$instance->editor->is_edit_mode() || \Elementor\Plugin::$instance->preview->is_preview_mode()) { |
| 19 |
Settings::getInstance()->set('isBuilder', true); |
| 20 |
} |
| 21 |
// add_filter('age_gate/restricted', '__return_false'); |
| 22 |
} |
| 23 |
} |
| 24 |
} |
| 25 |
|