| @@ -5,13 +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; |
| 11 | -use Elementor\Icons_Manager; | |
| 12 | 10 | use Elementor\Plugin; |
| 13 | -use Elementor\Utils; | |
| 14 | 11 | |
| 15 | 12 | if ( ! defined( 'ABSPATH' ) ) { |
| 16 | 13 | exit; // Exit if accessed directly. |
| 17 | 14 | } |
| @@ -35,11 +32,11 @@ | ||
| 35 | 32 | */ |
| 36 | 33 | public function __construct() { |
| 37 | 34 | $this->add_default_templates(); |
| 38 | 35 | |
| 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 ); | |
| 36 | + add_action( 'elementor/editor/before_enqueue_scripts', [ $this, 'register_scripts' ] ); | |
| 37 | + add_action( 'admin_enqueue_scripts', [ $this, 'register_scripts' ] ); | |
| 38 | + add_action( 'wp_enqueue_scripts', [ $this, 'register_scripts' ] ); | |
| 42 | 39 | |
| 43 | 40 | add_action( 'elementor/editor/before_enqueue_styles', [ $this, 'register_styles' ] ); |
| 44 | 41 | add_action( 'admin_enqueue_scripts', [ $this, 'register_styles' ] ); |
| 45 | 42 | add_action( 'wp_enqueue_scripts', [ $this, 'register_styles' ], 9 ); |
| @@ -68,14 +65,8 @@ | ||
| 68 | 65 | |
| 69 | 66 | $this->add_component( 'connect', new Connect() ); |
| 70 | 67 | |
| 71 | 68 | $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 | 69 | } |
| 79 | 70 | |
| 80 | 71 | /** |
| 81 | 72 | * Get name. |
| @@ -149,9 +140,8 @@ | ||
| 149 | 140 | 'elementor-common-modules', |
| 150 | 141 | 'elementor-web-cli', |
| 151 | 142 | 'elementor-dialog', |
| 152 | 143 | 'wp-api-request', |
| 153 | - 'elementor-dev-tools', | |
| 154 | 144 | ], |
| 155 | 145 | ELEMENTOR_VERSION, |
| 156 | 146 | true |
| 157 | 147 | ); |
| @@ -176,9 +166,9 @@ | ||
| 176 | 166 | wp_register_style( |
| 177 | 167 | 'elementor-icons', |
| 178 | 168 | $this->get_css_assets_url( 'elementor-icons', 'assets/lib/eicons/css/' ), |
| 179 | 169 | [], |
| 180 | - Icons_Manager::ELEMENTOR_ICONS_VERSION | |
| 170 | + '5.15.0' | |
| 181 | 171 | ); |
| 182 | 172 | |
| 183 | 173 | wp_enqueue_style( |
| 184 | 174 | 'elementor-common', |
| @@ -187,15 +177,8 @@ | ||
| 187 | 177 | 'elementor-icons', |
| 188 | 178 | ], |
| 189 | 179 | ELEMENTOR_VERSION |
| 190 | 180 | ); |
| 191 | - | |
| 192 | - wp_enqueue_style( | |
| 193 | - 'e-theme-ui-light', | |
| 194 | - $this->get_css_assets_url( 'theme-light' ), | |
| 195 | - [], | |
| 196 | - ELEMENTOR_VERSION | |
| 197 | - ); | |
| 198 | 181 | } |
| 199 | 182 | |
| 200 | 183 | /** |
| 201 | 184 | * Add template. |
| @@ -245,26 +228,18 @@ | ||
| 245 | 228 | * @return array |
| 246 | 229 | */ |
| 247 | 230 | protected function get_init_settings() { |
| 248 | 231 | $active_experimental_features = Plugin::$instance->experiments->get_active_features(); |
| 249 | - $all_experimental_features = Plugin::$instance->experiments->get_features(); | |
| 250 | 232 | |
| 251 | 233 | $active_experimental_features = array_fill_keys( array_keys( $active_experimental_features ), true ); |
| 252 | - $all_experimental_features = array_map( | |
| 253 | - function( $feature ) { | |
| 254 | - return Plugin::$instance->experiments->is_feature_active( $feature['name'] ); | |
| 255 | - }, | |
| 256 | - $all_experimental_features | |
| 257 | - ); | |
| 258 | 234 | |
| 259 | 235 | $config = [ |
| 260 | 236 | 'version' => ELEMENTOR_VERSION, |
| 261 | 237 | 'isRTL' => is_rtl(), |
| 262 | 238 | 'isDebug' => ( defined( 'WP_DEBUG' ) && WP_DEBUG ), |
| 263 | - 'isElementorDebug' => Utils::is_elementor_debug(), | |
| 239 | + 'isElementorDebug' => ( defined( 'ELEMENTOR_DEBUG' ) && ELEMENTOR_DEBUG ), | |
| 264 | 240 | 'activeModules' => array_keys( $this->get_components() ), |
| 265 | 241 | 'experimentalFeatures' => $active_experimental_features, |
| 266 | - 'allExperimentalFeatures' => $all_experimental_features, | |
| 267 | 242 | 'urls' => [ |
| 268 | 243 | 'assets' => ELEMENTOR_ASSETS_URL, |
| 269 | 244 | 'rest' => get_rest_url(), |
| 270 | 245 | ], |
| @@ -270,9 +245,8 @@ | ||
| 270 | 245 | ], |
| 271 | 246 | 'filesUpload' => [ |
| 272 | 247 | 'unfilteredFiles' => Uploads_Manager::are_unfiltered_uploads_enabled(), |
| 273 | 248 | ], |
| 274 | - 'editor_events' => Events_Manager::get_editor_events_config(), | |
| 275 | 249 | ]; |
| 276 | 250 | |
| 277 | 251 | /** |
| 278 | 252 | * Localize common settings. |
| @@ -289,9 +263,8 @@ | ||
| 289 | 263 | /** |
| 290 | 264 | * Add default templates. |
| 291 | 265 | * |
| 292 | 266 | * Register common app default templates. |
| 293 | - * | |
| 294 | 267 | * @since 2.3.0 |
| 295 | 268 | * @access private |
| 296 | 269 | */ |
| 297 | 270 | private function add_default_templates() { |