PluginProbe
Elementor Website Builder – more than just a page builder / 3.31.2
Elementor Website Builder – more than just a page builder v3.31.2
4.3.0-beta3 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 All 452 releases
← All changes | modules/checklist/module.php +5 -22 4.3.0-beta23.31.2 View file →
@@ -2,9 +2,9 @@
2 2
3 3 namespace Elementor\Modules\Checklist;
4 4
5 5 use Elementor\Core\Base\Module as BaseModule;
6 -use Elementor\Core\Experiments\Manager as Experiments_Manager;
6 +use Elementor\Core\Experiments\Manager;
7 7 use Elementor\Modules\ElementorCounter\Module as Elementor_Counter;
8 8 use Elementor\Core\Isolation\Wordpress_Adapter;
9 9 use Elementor\Core\Isolation\Wordpress_Adapter_Interface;
10 10 use Elementor\Core\Isolation\Elementor_Adapter;
@@ -12,8 +12,9 @@
12 12 use Elementor\Core\Isolation\Elementor_Counter_Adapter_Interface;
13 13 use Elementor\Plugin;
14 14 use Elementor\Utils;
15 15 use Elementor\Modules\Checklist\Data\Controller;
16 +use Elementor\Core\Utils\Isolation_Manager;
16 17
17 18 if ( ! defined( 'ABSPATH' ) ) {
18 19 exit; // Exit if accessed directly.
19 20 }
@@ -18,9 +19,8 @@
18 19 exit; // Exit if accessed directly.
19 20 }
20 21
21 22 class Module extends BaseModule implements Checklist_Module_Interface {
22 - const EXPERIMENT_NAME = 'launchpad-checklist';
23 23 const DB_OPTION_KEY = 'elementor_checklist';
24 24 const VISIBILITY_SWITCH_ID = 'show_launchpad_checklist';
25 25 const FIRST_CLOSED_CHECKLIST_IN_EDITOR = 'first_closed_checklist_in_editor';
26 26 const LAST_OPENED_TIMESTAMP = 'last_opened_timestamp';
@@ -42,17 +42,12 @@
42 42 public function __construct(
43 43 ?Wordpress_Adapter_Interface $wordpress_adapter = null,
44 44 ?Elementor_Adapter_Interface $elementor_adapter = null
45 45 ) {
46 - $this->wordpress_adapter = $wordpress_adapter ?? new Wordpress_Adapter();
47 - $this->elementor_adapter = $elementor_adapter ?? new Elementor_Adapter();
46 + $this->wordpress_adapter = $wordpress_adapter ?? Isolation_Manager::get_adapter( Wordpress_Adapter::class );
47 + $this->elementor_adapter = $elementor_adapter ?? Isolation_Manager::get_adapter( Elementor_Adapter::class );
48 48
49 49 parent::__construct();
50 -
51 - if ( ! Plugin::$instance->experiments->is_feature_active( self::EXPERIMENT_NAME ) ) {
52 - return;
53 - }
54 -
55 50 $this->init_user_progress();
56 51
57 52 Plugin::$instance->data_manager_v2->register_controller( new Controller() );
58 53 $this->user_progress = $this->user_progress ?? $this->get_user_progress_from_db();
@@ -74,19 +69,8 @@
74 69 public function get_name(): string {
75 70 return 'e-checklist';
76 71 }
77 72
78 - public static function get_experimental_data(): array {
79 - return [
80 - 'name' => self::EXPERIMENT_NAME,
81 - 'title' => esc_html__( 'Launchpad Checklist', 'elementor' ),
82 - 'description' => esc_html__( 'Launchpad Checklist feature to boost productivity and deliver your site faster', 'elementor' ),
83 - 'hidden' => true,
84 - 'default' => Experiments_Manager::STATE_INACTIVE,
85 - 'release_status' => Experiments_Manager::RELEASE_STATUS_STABLE,
86 - ];
87 - }
88 -
89 73 /**
90 74 * Gets user's progress from db
91 75 *
92 76 * @return array {
@@ -256,8 +240,7 @@
256 240 }, 11 );
257 241 }
258 242
259 243 public static function should_display_checklist_toggle_control(): bool {
260 - return Plugin::$instance->experiments->is_feature_active( self::EXPERIMENT_NAME )
261 - && current_user_can( 'manage_options' );
244 + return current_user_can( 'manage_options' );
262 245 }
263 246 }