| @@ -5,13 +5,11 @@ | ||
| 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; |
| 11 | 10 | use Elementor\Icons_Manager; |
| 12 | 11 | use Elementor\Plugin; |
| 13 | -use Elementor\Utils; | |
| 14 | 12 | |
| 15 | 13 | if ( ! defined( 'ABSPATH' ) ) { |
| 16 | 14 | exit; // Exit if accessed directly. |
| 17 | 15 | } |
| @@ -35,11 +33,11 @@ | ||
| 35 | 33 | */ |
| 36 | 34 | public function __construct() { |
| 37 | 35 | $this->add_default_templates(); |
| 38 | 36 | |
| 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 ); | |
| 37 | + add_action( 'elementor/editor/before_enqueue_scripts', [ $this, 'register_scripts' ] ); | |
| 38 | + add_action( 'admin_enqueue_scripts', [ $this, 'register_scripts' ] ); | |
| 39 | + add_action( 'wp_enqueue_scripts', [ $this, 'register_scripts' ] ); | |
| 42 | 40 | |
| 43 | 41 | add_action( 'elementor/editor/before_enqueue_styles', [ $this, 'register_styles' ] ); |
| 44 | 42 | add_action( 'admin_enqueue_scripts', [ $this, 'register_styles' ] ); |
| 45 | 43 | add_action( 'wp_enqueue_scripts', [ $this, 'register_styles' ], 9 ); |
| @@ -68,14 +66,8 @@ | ||
| 68 | 66 | |
| 69 | 67 | $this->add_component( 'connect', new Connect() ); |
| 70 | 68 | |
| 71 | 69 | $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 | 70 | } |
| 79 | 71 | |
| 80 | 72 | /** |
| 81 | 73 | * Get name. |
| @@ -100,24 +92,11 @@ | ||
| 100 | 92 | * @access public |
| 101 | 93 | */ |
| 102 | 94 | public function register_scripts() { |
| 103 | 95 | 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 | 96 | 'elementor-common-modules', |
| 116 | 97 | $this->get_js_assets_url( 'common-modules' ), |
| 117 | - [ | |
| 118 | - 'elementor-vendors-redux', | |
| 119 | - ], | |
| 98 | + [], | |
| 120 | 99 | ELEMENTOR_VERSION, |
| 121 | 100 | true |
| 122 | 101 | ); |
| 123 | 102 | |
| @@ -200,15 +179,8 @@ | ||
| 200 | 179 | 'elementor-icons', |
| 201 | 180 | ], |
| 202 | 181 | ELEMENTOR_VERSION |
| 203 | 182 | ); |
| 204 | - | |
| 205 | - wp_enqueue_style( | |
| 206 | - 'e-theme-ui-light', | |
| 207 | - $this->get_css_assets_url( 'theme-light' ), | |
| 208 | - [], | |
| 209 | - ELEMENTOR_VERSION | |
| 210 | - ); | |
| 211 | 183 | } |
| 212 | 184 | |
| 213 | 185 | /** |
| 214 | 186 | * Add template. |
| @@ -258,26 +230,18 @@ | ||
| 258 | 230 | * @return array |
| 259 | 231 | */ |
| 260 | 232 | protected function get_init_settings() { |
| 261 | 233 | $active_experimental_features = Plugin::$instance->experiments->get_active_features(); |
| 262 | - $all_experimental_features = Plugin::$instance->experiments->get_features(); | |
| 263 | 234 | |
| 264 | 235 | $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 | 236 | |
| 272 | 237 | $config = [ |
| 273 | 238 | 'version' => ELEMENTOR_VERSION, |
| 274 | 239 | 'isRTL' => is_rtl(), |
| 275 | 240 | 'isDebug' => ( defined( 'WP_DEBUG' ) && WP_DEBUG ), |
| 276 | - 'isElementorDebug' => Utils::is_elementor_debug(), | |
| 241 | + 'isElementorDebug' => ( defined( 'ELEMENTOR_DEBUG' ) && ELEMENTOR_DEBUG ), | |
| 277 | 242 | 'activeModules' => array_keys( $this->get_components() ), |
| 278 | 243 | 'experimentalFeatures' => $active_experimental_features, |
| 279 | - 'allExperimentalFeatures' => $all_experimental_features, | |
| 280 | 244 | 'urls' => [ |
| 281 | 245 | 'assets' => ELEMENTOR_ASSETS_URL, |
| 282 | 246 | 'rest' => get_rest_url(), |
| 283 | 247 | ], |
| @@ -283,9 +247,8 @@ | ||
| 283 | 247 | ], |
| 284 | 248 | 'filesUpload' => [ |
| 285 | 249 | 'unfilteredFiles' => Uploads_Manager::are_unfiltered_uploads_enabled(), |
| 286 | 250 | ], |
| 287 | - 'editor_events' => Events_Manager::get_editor_events_config(), | |
| 288 | 251 | ]; |
| 289 | 252 | |
| 290 | 253 | /** |
| 291 | 254 | * Localize common settings. |
| @@ -302,9 +265,8 @@ | ||
| 302 | 265 | /** |
| 303 | 266 | * Add default templates. |
| 304 | 267 | * |
| 305 | 268 | * Register common app default templates. |
| 306 | - * | |
| 307 | 269 | * @since 2.3.0 |
| 308 | 270 | * @access private |
| 309 | 271 | */ |
| 310 | 272 | private function add_default_templates() { |