PluginProbe
Elementor Website Builder – more than just a page builder / 3.35.8
Elementor Website Builder – more than just a page builder v3.35.8
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
← All changes | app/app.php +15 -5 4.2.03.35.8 View file →
@@ -22,9 +22,8 @@
22 22 use Elementor\App\Modules\KitLibrary\Module as KitLibraryModule;
23 23 use Elementor\App\Modules\ImportExportCustomization\Module as ImportExportCustomizationModule;
24 24 use Elementor\App\Modules\SiteEditor\Module as SiteEditorModule;
25 25 use Elementor\App\Modules\Onboarding\Module as OnboardingModule;
26 -use Elementor\App\Modules\SiteBuilder\Module as SiteBuilderModule;
27 26
28 27 if ( ! defined( 'ABSPATH' ) ) {
29 28 exit; // Exit if accessed directly.
30 29 }
@@ -50,12 +49,22 @@
50 49 public function get_base_url() {
51 50 return admin_url( 'admin.php?page=' . self::PAGE_ID . '&ver=' . ELEMENTOR_VERSION );
52 51 }
53 52
53 + private function register_admin_menu( Admin_Menu_Manager $admin_menu ) {
54 + if ( ! $this->is_editor_one_active() ) {
55 + $admin_menu->register( static::PAGE_ID, new Theme_Builder_Menu_Item() );
56 + }
57 + }
58 +
54 59 private function register_editor_one_menu( Menu_Data_Provider $menu_data_provider ) {
55 60 $menu_data_provider->register_menu( new Editor_One_Theme_Builder_Menu() );
56 61 }
57 62
63 + private function is_editor_one_active(): bool {
64 + return (bool) Plugin::instance()->modules_manager->get_modules( 'editor-one' );
65 + }
66 +
58 67 public function fix_submenu( $menu ) {
59 68 global $submenu;
60 69
61 70 if ( is_multisite() && is_network_admin() ) {
@@ -169,9 +178,9 @@
169 178 ->set_path_resolver( function ( $name ) {
170 179 return ELEMENTOR_ASSETS_PATH . "js/packages/{$name}/{$name}.asset.php";
171 180 } );
172 181
173 - Collection::make( [ 'ui', 'icons', 'store', 'query', 'utils', 'events', 'onboarding', 'schema', 'site-builder' ] )
182 + Collection::make( [ 'ui', 'icons' ] )
174 183 ->each( function( $package ) use ( $assets_config_provider ) {
175 184 $suffix = Utils::is_script_debug() ? '' : '.min';
176 185 $config = $assets_config_provider->load( $package )->get( $package );
177 186
@@ -256,10 +265,8 @@
256 265 'wp-url',
257 266 'wp-i18n',
258 267 'elementor-v2-ui',
259 268 'elementor-v2-icons',
260 - 'elementor-v2-onboarding',
261 - 'elementor-v2-site-builder',
262 269 'react',
263 270 'react-dom',
264 271 'select2',
265 272 ],
@@ -303,9 +310,8 @@
303 310 public function __construct() {
304 311 $this->register_import_export_customization_experiment();
305 312
306 313 $this->add_component( 'site-editor', new SiteEditorModule() );
307 - $this->add_component( 'site-builder', new SiteBuilderModule() );
308 314
309 315 if ( current_user_can( 'manage_options' ) || Utils::is_wp_cli() ) {
310 316 $this->add_component( 'import-export', new ImportExportModule() );
311 317
@@ -317,8 +323,12 @@
317 323 $this->add_component( 'kit-library', new KitLibraryModule() );
318 324 }
319 325
320 326 $this->add_component( 'onboarding', new OnboardingModule() );
327 +
328 + add_action( 'elementor/admin/menu/register', function ( Admin_Menu_Manager $admin_menu ) {
329 + $this->register_admin_menu( $admin_menu );
330 + }, Source_Local::ADMIN_MENU_PRIORITY + 10 );
321 331
322 332 add_action( 'elementor/editor-one/menu/register', function ( Menu_Data_Provider $menu_data_provider ) {
323 333 $this->register_editor_one_menu( $menu_data_provider );
324 334 } );