| @@ -5,10 +5,10 @@ | ||
| 5 | 5 | use Elementor\Core\Common\Modules\Ajax\Module as Ajax; |
| 6 | 6 | use Elementor\Core\Common\Modules\Finder\Module as Finder; |
| 7 | 7 | use Elementor\Core\Common\Modules\Connect\Module as Connect; |
| 8 | 8 | use Elementor\Core\Common\Modules\EventTracker\Module as Event_Tracker; |
| 9 | -use Elementor\Core\Common\Modules\EventsManager\Module as Events_Manager; | |
| 10 | 9 | use Elementor\Core\Files\Uploads_Manager; |
| 10 | +use Elementor\Core\Settings\Manager as SettingsManager; | |
| 11 | 11 | use Elementor\Icons_Manager; |
| 12 | 12 | use Elementor\Plugin; |
| 13 | 13 | use Elementor\Utils; |
| 14 | 14 | |
| @@ -35,11 +35,11 @@ | ||
| 35 | 35 | */ |
| 36 | 36 | public function __construct() { |
| 37 | 37 | $this->add_default_templates(); |
| 38 | 38 | |
| 39 | - add_action( 'elementor/editor/before_enqueue_scripts', [ $this, 'register_scripts' ], 9 ); | |
| 40 | - add_action( 'admin_enqueue_scripts', [ $this, 'register_scripts' ], 9 ); | |
| 41 | - add_action( 'wp_enqueue_scripts', [ $this, 'register_scripts' ], 9 ); | |
| 39 | + add_action( 'elementor/editor/before_enqueue_scripts', [ $this, 'register_scripts' ] ); | |
| 40 | + add_action( 'admin_enqueue_scripts', [ $this, 'register_scripts' ] ); | |
| 41 | + add_action( 'wp_enqueue_scripts', [ $this, 'register_scripts' ] ); | |
| 42 | 42 | |
| 43 | 43 | add_action( 'elementor/editor/before_enqueue_styles', [ $this, 'register_styles' ] ); |
| 44 | 44 | add_action( 'admin_enqueue_scripts', [ $this, 'register_styles' ] ); |
| 45 | 45 | add_action( 'wp_enqueue_scripts', [ $this, 'register_styles' ], 9 ); |
| @@ -68,14 +68,8 @@ | ||
| 68 | 68 | |
| 69 | 69 | $this->add_component( 'connect', new Connect() ); |
| 70 | 70 | |
| 71 | 71 | $this->add_component( 'event-tracker', new Event_Tracker() ); |
| 72 | - | |
| 73 | - Plugin::$instance->experiments->add_feature( Events_Manager::get_experimental_data() ); | |
| 74 | - | |
| 75 | - if ( Plugin::$instance->experiments->is_feature_active( Events_Manager::EXPERIMENT_NAME ) ) { | |
| 76 | - $this->add_component( 'events-manager', new Events_Manager() ); | |
| 77 | - } | |
| 78 | 72 | } |
| 79 | 73 | |
| 80 | 74 | /** |
| 81 | 75 | * Get name. |
| @@ -100,24 +94,11 @@ | ||
| 100 | 94 | * @access public |
| 101 | 95 | */ |
| 102 | 96 | public function register_scripts() { |
| 103 | 97 | wp_register_script( |
| 104 | - 'elementor-vendors-redux', | |
| 105 | - $this->get_js_assets_url( 'vendors-redux' ), | |
| 106 | - [ | |
| 107 | - 'react', | |
| 108 | - 'react-dom', | |
| 109 | - ], | |
| 110 | - ELEMENTOR_VERSION, | |
| 111 | - true | |
| 112 | - ); | |
| 113 | - | |
| 114 | - wp_register_script( | |
| 115 | 98 | 'elementor-common-modules', |
| 116 | 99 | $this->get_js_assets_url( 'common-modules' ), |
| 117 | - [ | |
| 118 | - 'elementor-vendors-redux', | |
| 119 | - ], | |
| 100 | + [], | |
| 120 | 101 | ELEMENTOR_VERSION, |
| 121 | 102 | true |
| 122 | 103 | ); |
| 123 | 104 | |
| @@ -258,17 +239,10 @@ | ||
| 258 | 239 | * @return array |
| 259 | 240 | */ |
| 260 | 241 | protected function get_init_settings() { |
| 261 | 242 | $active_experimental_features = Plugin::$instance->experiments->get_active_features(); |
| 262 | - $all_experimental_features = Plugin::$instance->experiments->get_features(); | |
| 263 | 243 | |
| 264 | 244 | $active_experimental_features = array_fill_keys( array_keys( $active_experimental_features ), true ); |
| 265 | - $all_experimental_features = array_map( | |
| 266 | - function( $feature ) { | |
| 267 | - return Plugin::$instance->experiments->is_feature_active( $feature['name'] ); | |
| 268 | - }, | |
| 269 | - $all_experimental_features | |
| 270 | - ); | |
| 271 | 245 | |
| 272 | 246 | $config = [ |
| 273 | 247 | 'version' => ELEMENTOR_VERSION, |
| 274 | 248 | 'isRTL' => is_rtl(), |
| @@ -275,9 +249,8 @@ | ||
| 275 | 249 | 'isDebug' => ( defined( 'WP_DEBUG' ) && WP_DEBUG ), |
| 276 | 250 | 'isElementorDebug' => Utils::is_elementor_debug(), |
| 277 | 251 | 'activeModules' => array_keys( $this->get_components() ), |
| 278 | 252 | 'experimentalFeatures' => $active_experimental_features, |
| 279 | - 'allExperimentalFeatures' => $all_experimental_features, | |
| 280 | 253 | 'urls' => [ |
| 281 | 254 | 'assets' => ELEMENTOR_ASSETS_URL, |
| 282 | 255 | 'rest' => get_rest_url(), |
| 283 | 256 | ], |
| @@ -283,9 +256,8 @@ | ||
| 283 | 256 | ], |
| 284 | 257 | 'filesUpload' => [ |
| 285 | 258 | 'unfilteredFiles' => Uploads_Manager::are_unfiltered_uploads_enabled(), |
| 286 | 259 | ], |
| 287 | - 'editor_events' => Events_Manager::get_editor_events_config(), | |
| 288 | 260 | ]; |
| 289 | 261 | |
| 290 | 262 | /** |
| 291 | 263 | * Localize common settings. |