PluginProbe
Elementor Website Builder – more than just a page builder / 3.7.5
Elementor Website Builder – more than just a page builder v3.7.5
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 | core/app/modules/kit-library/module.php +8 -10 3.7.43.7.5 View file →
@@ -1,7 +1,8 @@
1 1 <?php
2 2 namespace Elementor\Core\App\Modules\KitLibrary;
3 3
4 +use Elementor\Core\Admin\Menu\Admin_Menu_Manager;
4 5 use Elementor\Core\Admin\Menu\Main as MainMenu;
5 6 use Elementor\Plugin;
6 7 use Elementor\TemplateLibrary\Source_Local;
7 8 use Elementor\Core\Base\Module as BaseModule;
@@ -37,15 +38,12 @@
37 38
38 39 /**
39 40 * Register the admin menu the old way.
40 41 */
41 - private function register_admin_menu_legacy() {
42 - add_submenu_page(
43 - Source_Local::ADMIN_MENU_SLUG,
44 - __( 'Kit Library', 'elementor' ),
45 - __( 'Kit Library', 'elementor' ),
46 - 'manage_options',
47 - Plugin::$instance->app->get_base_url() . '#/kit-library'
42 + private function register_admin_menu_legacy( Admin_Menu_Manager $admin_menu ) {
43 + $admin_menu->register(
44 + Plugin::$instance->app->get_base_url() . '#/kit-library',
45 + new Kit_Library_Menu_Item()
48 46 );
49 47 }
50 48
51 49 private function set_kit_library_settings() {
@@ -85,11 +83,11 @@
85 83 add_action( 'elementor/admin/menu_registered/elementor', function( MainMenu $menu ) {
86 84 $this->register_admin_menu( $menu );
87 85 } );
88 86 } else {
89 - add_action( 'admin_menu', function() {
90 - $this->register_admin_menu_legacy();
91 - }, 50 /* after Elementor page */ );
87 + add_action( 'elementor/admin/menu/register', function( Admin_Menu_Manager $admin_menu ) {
88 + $this->register_admin_menu_legacy( $admin_menu );
89 + }, Source_Local::ADMIN_MENU_PRIORITY + 30 );
92 90 }
93 91
94 92 add_action( 'elementor/connect/apps/register', function ( ConnectModule $connect_module ) {
95 93 $connect_module->register_app( 'kit-library', Kit_Library::get_class_name() );