PluginProbe
Elementor Website Builder – more than just a page builder / 4.2.0
Elementor Website Builder – more than just a page builder v4.2.0
4.3.0-beta2 4.3.0-beta1 4.2.4 4.2.3 4.2.2 4.2.1 4.2.0 4.1.5 4.2.0-beta2 4.2.0-dev2 4.2.0-beta1 4.1.4 4.1.3 4.1.2 4.1.1 4.1.0 4.1.0-beta3 4.1.0-dev3 4.0.9 4.1.0-beta2 4.1.0-dev2 4.0.8 4.1.0-beta1 4.1.0-dev1 4.0.7 All 451 releases
elementor / modules / atomic-opt-in / module.php

module.php in Elementor Website Builder – more than just a page builder 4.2.0, at modules/atomic-opt-in/module.php

55 lines 1.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace Elementor\Modules\AtomicOptIn;
4
5 use Elementor\Core\Base\Module as BaseModule;
6 use Elementor\Core\Experiments\Manager as Experiments_Manager;
7 use Elementor\Modules\AtomicWidgets\OptIn\Opt_In as Atomic_Widgets_Opt_In;
8 use Elementor\Plugin;
9
10 class Module extends BaseModule {
11 const EXPERIMENT_NAME = 'e_opt_in_v4_page';
12 const MODULE_NAME = 'editor-v4-opt-in';
13 const WELCOME_POPOVER_DISPLAYED_OPTION = '_e_welcome_popover_displayed';
14
15 public function get_name() {
16 return 'atomic-opt-in';
17 }
18
19 public static function get_experimental_data(): array {
20 return [
21 'name' => self::EXPERIMENT_NAME,
22 'title' => esc_html__( 'Editor v4 (Opt In Page)', 'elementor' ),
23 'description' => esc_html__( 'Enable the settings Opt In page', 'elementor' ),
24 'hidden' => true,
25 'default' => Experiments_Manager::STATE_ACTIVE,
26 'release_status' => Experiments_Manager::RELEASE_STATUS_ALPHA,
27 ];
28 }
29
30 public function get_opt_in_css_assets_url( string $path ) {
31 return $this->get_css_assets_url( $path );
32 }
33
34 public function __construct() {
35 ( new PanelChip() )->init();
36
37 if ( ! Plugin::$instance->experiments->is_feature_active( self::EXPERIMENT_NAME ) ) {
38 return;
39 }
40
41 ( new Atomic_Widgets_Opt_In() )->init();
42 ( new OptInPage( $this ) )->init();
43
44 if ( ! $this->is_atomic_experiment_active() ) {
45 return;
46 }
47
48 ( new WelcomeScreen() )->init();
49 }
50
51 public function is_atomic_experiment_active(): bool {
52 return Plugin::$instance->experiments->is_feature_active( Atomic_Widgets_Opt_In::EXPERIMENT_NAME );
53 }
54 }
55